DEV Community

Cover image for TIL: MySQL timestamp column can't go beyond '2038-01-19 03:14:07'
Xinecraft
Xinecraft

Posted on Edited on

TIL: MySQL timestamp column can't go beyond '2038-01-19 03:14:07'

MySQL 'timestamp' type column cannot store value beyond '2038-01-19 03:14:07' UTC, i.e., Int32 limit (2147483647).

What do you think about Postgres timestamp column. Can they?

Top comments (3)

Collapse
 
franckpachot profile image
Franck Pachot •

Sure PostgreSQL can. Seems MySQL fixed it in 8.0.28: bugs.mysql.com/bug.php?id=12654

Collapse
 
ben profile image
Ben Halpern •

TIL. Is this a tough thing to work around if you need to date stuff way in the future for any reason?

Collapse
 
dogers profile image
Dogers •

Why not just use DATETIME format instead?

Postgres does it better (as usual :) ) and doesn't have the issue at all though, IIRC.