Open yairpe opened 7 years ago
This is an extreme edge case ... a far majority of apps built today won't exist 20 years from now. I'd be amazed if any did lol.
Anyhow, if they ever get there they can convert it when the time comes. We'll have a big panic similar to y2k and everyone will be aware of it.
A gmdate is a GMT date :( and not a date in my timezone (Europe/Rome) so when it save for example: $this->logged_in_at = gmdate("Y-m-d H:i:s"); i have: real time 00:55, database saved time with gmdate: 23:53
Right now, the user tables are using mysql TIMESTAMP integer and
gmdate("Y-m-d H:i:s")
in the code.To avoid the 1970-2038 limitation (20 years from now), I believe it's better to use DATETIME field and use
(new \DateTime('NOW'))->format('Y-m-d H:i:s')
mysql knows to preserve the current date&time values when switching from TIMESTAMP to DATETIME