Why should a Java programmer care about year 2038 bug?

前端 未结 5 1232
花落未央
花落未央 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:38

    What makes you think it does? Java's Date class stores a 64-bit long (not 32-bit, as with Y2K38). It also stores milliseconds, which decreases the range, but only slightly (equivalent of ~10 bits).

    In Java, we have the year 292278994 bug.

提交回复
热议问题