[英]Joda time zone calculation
一直在玩Joda时区,发现以下看起来很奇怪。
我运行了以下代码
DateTimeZone gmt = DateTimeZone.forID( "Etc/GMT" );
DateTimeZone gmtPlusOne = DateTimeZone.forID( "Etc/GMT+1" );
DateTimeZone gmtMinusOne = DateTimeZone.forID( "Etc/GMT-1" );
System.out.println( new DateTime( gmt ).toString() );
System.out.println( new DateTime( gmtPlusOne ).toString() );
System.out.println( new DateTime( gmtMinusOne ).toString() );
并得到以下输出
2011-10-24T13:00:12.890Z
2011-10-24T12:00:12.937-01:00
2011-10-24T14:00:12.937+01:00
看到“gmtPlusOne”以-01:00落后一小时,而“gmtMinusOne”则相反,我感到有些惊讶。 有人可以解释为什么这些会像我预期的那样出现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.