`
yaojingguo
  • 浏览: 212629 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

October 14 UTC does not exist in 1582

阅读更多

The following code shows this effect.

 

  @Test
  public void blog() throws java.text.ParseException {
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
    Date d = df.parse("1582-10-14T00:00:00+0000");
    System.out.println(df.format(d));
  }

 The result is 1582-10-24T00:00:00+0000 instead of 1582-10-14T00:00:00+0000. Java simply uses 24 for 14, which is really confusing.

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics