On Tue, Jun 23, 2009 at 10:55 AM, Hans Zaunere <[email protected]> wrote:
> > You say I should be able to mysqldump a table with TIMESTAMP data from > > a database residing in NY, move the dump file to a different time zone, > > load it into the mysql db in that other time zone, and have the > > TIMESTAMP data still be in US/New York time? I have been banging my > > I actually had meant just to store the text file itself (as a text file) to > a remote location, then you can restore it back to the main server if > needed. Since it won't be loaded into a database in a different timezone, > there wouldn't be any issues. > Oh, my bad. What I am really doing is a kind of poor-man's replication. (Very poor.) I have master-slave replication going among servers within the same building but -- you see the problem, if there's a serious building-wide problem. I want a cron job to put a copy of this db on a remote site like four times a day. We are firewalled, and I also want (certain) people to be able to view the data on the remote (but public) server even if it's up to several hours old. > > > head for hours now, trying adding SET TIME_ZONE='US/Easterm' and > > various tricks, nothing works. Here's an example, maybe someone can see > > where I am going wrong: > > What if you try something like this: > > SET TIME_ZONE='-05:00'; > Looks like that would be an hour too early. mysql> prompt California> [ for clarity's sake] PROMPT set to 'California> ' California> select now(); +---------------------+ | now() | +---------------------+ | 2009-06-23 08:10:06 | +---------------------+ 1 row in set (0.00 sec) California> SET TIME_ZONE='-05:00'; Query OK, 0 rows affected (0.00 sec) California> select now(); +---------------------+ | now() | +---------------------+ | 2009-06-23 10:10:20 | +---------------------+ 1 row in set (0.00 sec) California> SET TIME_ZONE='US/Eastern'; Query OK, 0 rows affected (0.00 sec) California> select now(); +---------------------+ | now() | +---------------------+ | 2009-06-23 11:10:40 | +---------------------+ 1 row in set (0.00 sec) I find it rather odd that this is such a problem, it's not like this situation is especially unusual. -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness
_______________________________________________ New York PHP Community MySQL SIG http://lists.nyphp.org/mailman/listinfo/mysql NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
