Why when year is less than 1884, it remove few milliseconds?

后端 未结 2 1477
醉梦人生
醉梦人生 2020-12-06 17:43
DateTime start = new DateTime().withYear(1884);
System.out.println(start);
System.out.println(start.minusYears(1));

Output

1884-01-         


        
2条回答
  •  被撕碎了的回忆
    2020-12-06 17:45

    The standard time has been adopted by the US during this year.

    1883: U.S. and Canadian railways adopt five standardized time zones to replace the multiplicity of local times in communities across the continent. Everyone would soon be operating on "railroad time."

    Source

    Wikipedia page about Standard Time

提交回复
热议问题