java - joda time, DateTimeFormatter -


i have following code

datetimeformat = isodatetimeformat.datetimenomillis() 

and use datetimeformat below

public static string print(date value) {     return datetimeformat.print(value.gettime()); } 

and problem, in print method put many date instances + 4 hours time, , after datetimeformat.print(value.gettime()); time +3 hour, 1 of date instances become +4 hours, error me.

in date instances has same time zone europe/moscow

what may wrong in case?

in date instances has same time zone europe/moscow

a date instance doesn't have time zone - it's instant in time. should specify time zone formatter, e.g.

datetimeformat = isodatetimeformat     .datetimenomillis()     .withzoneutc(); 

if want value does know time zone, should use datetime instead of date.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -