Jump to content
Larry Ullman's Book Forums

Timestamp()


Recommended Posts

TIMESTAMP()

*A timestamp. TIMESTAMP values are stored as the number of seconds since the Unix epoch ('1970-01-01 00:00:00' UTC). Format: YYYY-MM-DD HH:MM:SS

 

Note: The supported range is from '1970-01-01 00:00:01' UTC to '2038-01-09 03:14:07' UTC

 

"I was wondering about the TIMESTAMP() data type, well this runs out in 2038, what if we are building a site that we are planning to have longer than 2038? Should we use the TIMESTAMP() now and hope PHP will do something about this or DATETIME() which runs up to 9999?"

 

DATETIME()

*A date and time combination. Format: YYYY-MM-DD HH:MM:SS

Note: The supported range is from '1000-01-01 00:00:00' to '9999-12-31 23:59:59'

Link to comment
Share on other sites

Well, to be clear, this is a MySQL issue, not a PHP one. But I'm not worried about this in the slightest. We're talking about 26 years from now. How many sites created today will even exist in 26 years? And what percentage of those sites will still use the same code? And even if there are some, I would expect that MySQL would have fixed things by then, assuming that MySQL even exists.

Link to comment
Share on other sites

 Share

×
×
  • Create New...