Edward Posted January 20, 2012 Share Posted January 20, 2012 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 More sharing options...
Larry Posted January 20, 2012 Share Posted January 20, 2012 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 More sharing options...
Edward Posted January 20, 2012 Author Share Posted January 20, 2012 Thank you for correcting me on the data types. Well you have some good points there, i guess there is a chance may be even i do not exist in 26 years time, lol. Well so be it, TIMESTAMP() it will be. Thanks Larry Link to comment Share on other sites More sharing options...
Recommended Posts