From: Jeff McKeon Date: September 21 2005 1:11pm Subject: RE: Timezone setting wrong? List-Archive: http://lists.mysql.com/mysql/189366 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Jeff [mailto:jsmforum@stripped]=20 > Sent: Wednesday, September 21, 2005 08:55 > To: mysql@stripped > Subject: Timezone setting wrong? >=20 >=20 > I've got a RHEL3 server I just installed with mysql 4.0.16. >=20 > The hardware clock and system clock are both set to UTC and=20 > show the correct time. >=20 > If I do a select Now(); from mysql it show's the correct time >=20 > However, >=20 > Unixtimestamp fields written to a table all are an hour off. =20 > They're one hour ahead. =20 > All the data on this system is replicated from a master. The=20 > master is set correctly, hwclock and sysclock at UTC. >=20 > The same query: >=20 > Select max(from_unixtime(timestamp_field)) from table; >=20 > Run on both servers returns a result 1 hour ahead on the new slave. >=20 > A show variables on the new slave returns >=20 > *************************** 120. row *************************** > Variable_name: timezone > Value: IST >=20 > I'm sure I've missed something simple here but what? >=20 > Thanks, >=20 > Jeff >=20 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? =20 I've tried putting TZ =3D GMT and TZ =3D UTC into the my.cnf file but = then mysql won't even start.