Search code examples
javagoogle-calendar-apijava-6

Time zone issue with day light saving in java


In my web application I am using Google calendar. Due to day light savings issue day light savings time is added when I saved the events in Google calendar through my application.

My application uses Java 1.6 and Google calendar v3.

What is the best solution to handle every time zone in the world?


Solution

  • You may use SimpleDateFormat class as stated here before Java8

    or may use ZonedDateTime in Java 8 as mentioned here

    Hope that helps.