3 ms·
As per gakman's comment in the Google+ crosspost[1], be wary of the Unix millenium bug[2] if you use integers for timestamp storage. [1] https://plus.google.co
by sgerrand 15y ago
As per gakman's comment in the Google+ crosspost[1], be wary of the Unix millenium bug[2] if you use integers for timestamp storage.
[1] https://plus.google.com/106356964679457436995/posts/Hzq2P7V6KUw https://plus.google.com/106356964679457436995/posts/Hzq2P7V6...
[2] http://en.wikipedia.org/wiki/Year_2038_problem http://en.wikipedia.org/wiki/Year_2038_problem
- sneak 15y ago"But there's no way my code will be running unchanged in 2038!"
- yoyar 15y agoI wonder about storing the timestamp in a varchar field of sufficient size to avoid all of these headaches? Although I guess 64 bit will suffice for a very long time.
- caf 15y agoAs a point of reference, the universe is estimated at less than 2^59 seconds old.
- andrewcooke 15y agoman 3p time suggests using time_t to "ease the eventual fix".