在我的机器中,设置的时区是(UTC)协调世界时。但下面的示例代码返回巴基斯坦时间和 +5:00
private void Foo()
{
DateTimeFormatter dtf = DateTimeFormat.forPattern("ZZ");
DateTime dt = DateTime.now();
System.out.println(dtf.print(dt)); // Prints +05:00, though expected is +00:00
DateTimeZone tz = DateTimeZone.getDefault();
System.out.println(" Get Name " + tz.getName(System.currentTimeMillis()));
// Prints Get Name Pakistan Time , although expected is Coordinated Universal Time
}