Java.util.Calendar - milliseconds since Jan 1, 1970

后端 未结 6 2100
梦毁少年i
梦毁少年i 2021-01-05 02:03

Program followed by output. Someone please explain to me why 10,000,000 milliseconds from Jan 1, 1970 is November 31, 1969. Well, someone please explain what\'s wrong with

6条回答
  •  抹茶落季
    2021-01-05 02:55

    Sadly, java.util.Date and java.util.Calendar were poorly designed leading to this sort of confusion.

提交回复
热议问题