PHP & mySQL: Year 2038 Bug: What is it? How to solve it?

前端 未结 6 1607
悲哀的现实
悲哀的现实 2020-11-22 16:37

I was thinking of using TIMESTAMP to store the date+time, but I read that there is a limitation of year 2038 on it. Instead of asking my question in bulk, I preferred to bre

6条回答
  •  死守一世寂寞
    2020-11-22 17:01

    A quick search on Google will do the trick: Year 2038 problem

    1. The year 2038 problem (also known as Unix Millennium Bug, Y2K38 by analogy to the Y2K problem) may cause some computer software to fail before or in the year 2038
    2. The problem affects all software and systems that store system time as a signed 32-bit integer, and interpret this number as the number of seconds since 00:00:00 UTC on January 1, 1970. The latest time that can be represented this way is 03:14:07 UTC on Tuesday, 19 January 2038. Times beyond this moment will "wrap around" and be stored internally as a negative number, which these systems will interpret as a date in 1901 rather than 2038
    3. There is no easy fix for this problem for existing CPU/OS combinations, existing file systems, or existing binary data formats

提交回复
热议问题