Please help me with this case:
I think we can write a util to convert datetime, plus or minus it. Is there a stand way to implement it?
Pick the date and add the times one for the conversion. All the Joda timezones are here :
final DateTime dt = new DateTime();
// translate to Honolulu local time
final DateTime dtVancouver = dt.withZone(DateTimeZone.forID("Etc/GMT+8"));
final DateTime dtHonolulu = dt.withZone(DateTimeZone.forID("Etc/GMT+10"));
System.out.println(dt);
System.out.println(dtVancouver);
System.out.println(dtHonolulu);
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.