简体   繁体   中英

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?

You may use SimpleDateFormat class as stated here before Java8

or may use ZonedDateTime in Java 8 as mentioned here

Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM