tsql
tsql copied to clipboard
Investigate Y2038 problem with MySQL and PostgreSQL
https://bugs.mysql.com/bug.php?id=12654
https://stackoverflow.com/questions/2012589/php-mysql-year-2038-bug-what-is-it-how-to-solve-it
One should use DATETIME nowadays, instead of TIMESTAMP in MySQL. But there are also other, more subtle, bugs that can happen because of Y2038
SELECT unix_timestamp('2038-01-20');
> 0
The bugs.mysql.com link has workarounds for some of the Y2038-related problems. However, there are probably other problems that need to be investigated.
https://bugs.mysql.com/bug.php?id=71758
https://dev.mysql.com/worklog/task/?id=1872#targetText=Currently%20we%20support%20only%20dates,internal%20representation%20of%20TIMESTAMP%20type.