Why should a Java programmer care about year 2038 bug?

前端 未结 5 1233
花落未央
花落未央 2020-12-16 14:55

Year 2038 Bug is all over the web, But this seems to be a unix issue. How will this affect java Date ?

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 15:36

    This is not really an answer. But some posts have gotten it right. Java is 2038 compliant, but not 10000 compliant (if you put a long into the Date constructor that represents something after 9999, it will not work and return some weird number), but yes, 2147483648 is definitely not the maximum allowed value in Java's Date class.

提交回复
热议问题