Sunday, January 08, 2006

mysqldump's tz-utc trap

This blog post has moved. Please find it at:


rhuddleston said...

The idea of the utc option is that it dumps timestamp values out into UTC time so it's transportable to any other system no matter what their timze_zone is. Since it sets the timezone at the top of the dump also to UTC it should import the data correctly. If this isn't happening I would think this is a bug.

Markus Popp said...

I don't think that it's a bug, I can dump a table containing date/time information and re-import it and get the same results, at least on the same MySQL 5.0 server from where the dump file results. However, I created yesterday's dump file from a MySQL 4.0 server, so maybe there's some incompatibility. But with disabling tz-utc it was easy to work around this problem.

Steffen said...

Thank you very much for clarifying this. I ran into the problem when restoring parts of a single table due to a user accidentally deleting... in case partial restores are needed, no timezone conversion makes life far more easier.