Comments - TIMESTAMP

7 years, 8 months ago Andy Walker

It's important to note that MariaDB (and MySQL) both have the notion of a server timezone - when writing an explicit value to a timestamp column, time data is converted from the server timezone into UTC for storage, then converted back to server time when reading.

If you're planning on using the timestamp data type to hold timestamps which already in UTC, it's probably worth setting your server timezone to UTC. Alternatively, pay the size penalty and use the DATETIME type, which isn't affected by timezones.

https://mariadb.com/kb/en/mariadb/time-zones/

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.