At 4:40 PM -0600 2/20/07, Ryan Stille wrote:
Is there an easy way to test to see if MySQL already has the proper tables loaded?

-Ryan

Yes, reload them. :-)  After that, they're current!

If you really want a non-reload test, you can do something like this
(Credits: This example comes from Peter Gulutzan)

Find out the time zone id for the region:

mysql> select * from mysql.time_zone_name
    -> where Name = 'America/Edmonton';
+------------------------+--------------+
| Name                   | Time_zone_id |
+------------------------+--------------+
| America/Edmonton       |          100 |
+------------------------+--------------+
1 row in set (0.97 sec)

Find out the transition dates for that zone in this year:

mysql> select * from time_zone_transition
    -> where Time_zone_id =
    -> and Transition_time between 1167634800 and 1199170799
    -> order by Time_zone_id,Transition_time;
+--------------+-----------------+--------------------+
| Time_zone_id | Transition_time | Transition_type_id |
+--------------+-----------------+--------------------+
|          100 |      1175418000 |                  1 |
|          100 |      1193558400 |                  2 |
+--------------+-----------------+--------------------+
2 rows in set (0.00 sec)

Find out what '1175418000' and '1193558400' mean:

mysql> select from_unixtime(1175418000);
+---------------------------+
| from_unixtime(1175418000) |
+---------------------------+
| 2007-04-01 03:00:00       |
+---------------------------+
1 row in set (0.00 sec)

mysql> select from_unixtime(1193558400);
+---------------------------+
| from_unixtime(1193558400) |
+---------------------------+
| 2007-10-28 01:00:00       |
+---------------------------+
1 row in set (0.00 sec)

Diagnosis: this database thinks the switch is on April 1,
which is wrong. Cure: update your operating system files,
check the "MySQL Server Time Zone Support" section of
the manual, and update the table.


So, as you can see, it's probably easier just to reload the files.



Paul DuBois wrote:
At 4:17 PM -0600 2/20/07, Paul DuBois wrote:
At 4:36 PM -0500 2/20/07, Sun, Jennifer wrote:
Any answers for the question below ?

Is there a DST patch for MySql 4.0.20?   Thanks.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, February 09, 2007 9:30 AM
To: mysql@lists.mysql.com
Subject: MySQL Daylight Savings Time Patch

Is there a DST patch for MySQL 4.0.x series?

I've been getting scary emails from our sys and net admins about
impending
doom.

Thanks,

David

Before MySQL 4.1.3, the server gets its time zone from the operating system
at startup.  The time zone can be specified explicitly by setting the TZ
TZ environment variable setting, or by using the --timezone option to the
mysqld_safe server startup script.

Assuming that the server host itself has had its operating system updated
to handle the new Daylight Saving Time rules, that should be all that's
necessary for MySQL to know the correct time.

I should mention also:

For those of you running 4.1.3 or later, to get your MySQL server to
know about the new DST rules, you should make sure your OS is updated
with the new zoneinfo files, and then reload those files into MySQL
with mysql_tzinfo_to_sql.  See:

http://dev.mysql.com/doc/mysql/en/time-zone-support.html

Particularly the Note in the middle of the page and the last few paragraphs.

You may have previously loaded your system's zoneinfo files into MySQL,
but when those zoneinfo files are updated, the changes do not automatically
propagate to MySQL's time zone tables.  You must reload the tables to update
them.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to