6

The Mysql document says that

The TIME STAMP data type is used for values that contain both date and time parts. TIME STAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC.

In our db,most of the time field are TIME STAMP.If current system can live to 2038,what will happen?

baao
  • 71,625
  • 17
  • 143
  • 203
Patato
  • 1,464
  • 10
  • 12
  • 1
    I would try it out. Create a table with a field of type TIMESTAMP. And insert a recordset with a time - say '2038-01-20 00:00:00'. But I assume; until 2038 the guys with mysql (Oracle) will change the TIMESTAMP type. – Peter Paul Kiefer Apr 08 '16 at 12:04
  • 3
    This is an issue that extends beyond MySQL https://en.wikipedia.org/wiki/Year_2038_problem – Alex K. Apr 08 '16 at 12:07
  • 1
    MySQL will have to deal with this Issue as long as they use a 32 Bit time type and interprete it as a unix epoche beginning in 1970. If they change their time type to a 64 bit time, the problem will occur again when our sun will have been exploded ;-). You will also have a problem if you go the other direction. What if you are an history professor and and you want the store information of an event happend in say - 1492. So using an unix epoche for log files seams to be a good idea (at least until 2038) but using it for the TIMESTAMP type in a database is not so perfect. :-) – Peter Paul Kiefer Apr 08 '16 at 12:22

0 Answers0