1

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

I met problem when converts timestamp (of year of 2038 or above) to date in PHP, it always shows year of 1901 instead 2038 or above. But everything works correctly when converts timestamp of year < 2038. Please help me to solve this problem. Thank you very much!

Community
  • 1
  • 1

1 Answers1

1

its because of the limit of INT datatype on 32 bit machine

enter image description here

Solution

  1. Use long data types (64 bits is sufficient)
  2. For MySQL, store dates as DATETIME rather than TIMESTAMP
NullPoiиteя
  • 56,591
  • 22
  • 125
  • 143