RE: Timezone setting wrong?

2005-09-21 Thread Jeff McKeon
 -Original Message-
 From: Jeff [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 21, 2005 08:55
 To: mysql@lists.mysql.com
 Subject: Timezone setting wrong?
 
 
 I've got a RHEL3 server I just installed with mysql 4.0.16.
 
 The hardware clock and system clock are both set to UTC and 
 show the correct time.
 
 If I do a select Now(); from mysql it show's the correct time
 
 However,
 
 Unixtimestamp fields written to a table all are an hour off.  
 They're one hour ahead.  
 All the data on this system is replicated from a master.  The 
 master is set correctly, hwclock and sysclock at UTC.
 
 The same query:
 
 Select max(from_unixtime(timestamp_field)) from table;
 
 Run on both servers returns a result 1 hour ahead on the new slave.
 
 A show variables on the new slave returns
 
 *** 120. row ***
 Variable_name: timezone
 Value: IST
 
 I'm sure I've missed something simple here but what?
 
 Thanks,
 
 Jeff
 

Ok, update, show variables on the master returns timezone of GMT, the
slave IST.  The master is on RH9 and the slave on RHEL3.
So on mysql 4.0.16 where do I force the timezone to be GMT?  

I've tried putting TZ = GMT and TZ = UTC into the my.cnf file but then
mysql won't even start.


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



RE: Timezone setting wrong?

2005-09-21 Thread Petr Chardin
 I've tried putting TZ = GMT and TZ = UTC into the my.cnf file but then
 mysql won't even start.

These should be set as environment variables, not as configuration
options. You could also try setting time_zone system variable with
set @@time_zone=GMT.

Petr


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



RE: Timezone setting wrong?

2005-09-21 Thread Atle Veka
I use this in my.cnf (along with mysqld_multi settings fwiw) and it works
great (mysql version 4.0.X):
[mysqld_safe]
timezone = GMT

It depends on how you start up mysqld.. If you don't use mysqld_safe, the
above wont work for you.


Atle
-
Flying Crocodile Inc, Unix Systems Administrator

On Wed, 21 Sep 2005, Petr Chardin wrote:

  I've tried putting TZ = GMT and TZ = UTC into the my.cnf file but then
  mysql won't even start.

 These should be set as environment variables, not as configuration
 options. You could also try setting time_zone system variable with
 set @@time_zone=GMT.

 Petr




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