Any way to change tinezone WITHOUT mysqld restart?
Any way to change tinezone WITHOUT mysqld restart?
am 01.10.2010 19:25:24 von bcantwell
--=-SP+WlZNzxd85KUDVplja
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Any way to change timezone WITHOUT mysqld restart?
It would be a lifesaver if there were some way for me not to have to
restart because if mysql restarts then I have to go through a lot of
other issues with my other apps.
--=-SP+WlZNzxd85KUDVplja--
RE: Any way to change tinezone WITHOUT mysqld restart?
am 02.10.2010 00:42:46 von Daevid Vincent
Did you even look at the manual?
http://lmgtfy.com/?q=mysql+set+timezone
First link.
> -----Original Message-----
> From: Bryan Cantwell [mailto:bcantwell@firescope.com]
> Sent: Friday, October 01, 2010 10:25 AM
> To: mysql@lists.mysql.com
> Subject: Any way to change tinezone WITHOUT mysqld restart?
>
> Any way to change timezone WITHOUT mysqld restart?
> It would be a lifesaver if there were some way for me not to have to
> restart because if mysql restarts then I have to go through a lot of
> other issues with my other apps.
>
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
RE: Any way to change timezone WITHOUT mysqld restart?
am 02.10.2010 14:18:27 von bcantwell
--=-9PL0zl+dFBjzOOJ+JNef
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
As a matter of fact I did, the real question is : Did you even read my
email? I said WITHOUT a restart...
The manual states that a restart of the mysqld is required. The reason
for the post to such a list is because on many occasions, user have
suggestions on some workaround for things that do work in spite of what
the manual says.
On Fri, 2010-10-01 at 15:42 -0700, Daevid Vincent wrote:
> Did you even look at the manual?
>
> http://lmgtfy.com/?q=mysql+set+timezone
>
> First link.
>
>
> > -----Original Message-----
> > From: Bryan Cantwell [mailto:bcantwell@firescope.com]
> > Sent: Friday, October 01, 2010 10:25 AM
> > To: mysql@lists.mysql.com
> > Subject: Any way to change timezone WITHOUT mysqld restart?
> >
> > Any way to change timezone WITHOUT mysqld restart?
> > It would be a lifesaver if there were some way for me not to have to
> > restart because if mysql restarts then I have to go through a lot of
> > other issues with my other apps.
> >
> >
> >
>
--=-9PL0zl+dFBjzOOJ+JNef--
Re: Any way to change timezone WITHOUT mysqld restart?
am 03.10.2010 10:23:12 von Johan De Meersman
--0022152d6e5985d8470491b223dc
Content-Type: text/plain; charset=ISO-8859-1
I suggest you put your glasses on, then. Getting of that horse might help,
too.
default-time-zone='*timezone*'
>
> If you have the SUPERprivilege, you can set the global server time zone value at runtime with
> this statement:
>
On Sat, Oct 2, 2010 at 2:18 PM, Bryan Cantwell wrote:
> As a matter of fact I did, the real question is : Did you even read my
> email? I said WITHOUT a restart...
> The manual states that a restart of the mysqld is required. The reason
> for the post to such a list is because on many occasions, user have
> suggestions on some workaround for things that do work in spite of what
> the manual says.
>
> On Fri, 2010-10-01 at 15:42 -0700, Daevid Vincent wrote:
>
> > Did you even look at the manual?
> >
> > http://lmgtfy.com/?q=mysql+set+timezone
> >
> > First link.
> >
> >
> > > -----Original Message-----
> > > From: Bryan Cantwell [mailto:bcantwell@firescope.com]
> > > Sent: Friday, October 01, 2010 10:25 AM
> > > To: mysql@lists.mysql.com
> > > Subject: Any way to change timezone WITHOUT mysqld restart?
> > >
> > > Any way to change timezone WITHOUT mysqld restart?
> > > It would be a lifesaver if there were some way for me not to have to
> > > restart because if mysql restarts then I have to go through a lot of
> > > other issues with my other apps.
> > >
> > >
> > >
> >
>
>
>
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
--0022152d6e5985d8470491b223dc--
RE: Any way to change timezone WITHOUT mysqld restart?
am 05.10.2010 02:03:53 von Daevid Vincent
------=_NextPart_000_022D_01CB63E6.210A9280
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Trust me, I read it.
We had an I18N product at my last company and all our time was stored in
UTC in mySQL and we'd alter it on the fly for each user. This isn't rocket
science. It's done every day in probably many of the sites you visit and
don't even know it.
To clarify for you (again):
*
Per-connection time zones. Each client that connects has its own time zone
setting, given by the session
_time_zone> time_zone variable. Initially, the session variable takes its
value from the global
_time_zone> time_zone variable, but the client can change its own time zone
with this statement:
mysql> SET time_zone = timezone;
The current session time zone setting affects display and storage of time
values that are zone-sensitive. This includes the values displayed by
functions such as
on_now> NOW() or
on_curtime> CURTIME(), and values stored in and retrieved from
TIMESTAMP columns.
Values for
TIMESTAMP columns are converted from the current time zone to UTC for
storage, and from UTC to the current time zone for retrieval.
Don't forget to do this stuff too:
http://dev.mysql.com/doc/refman/5.1/en/mysql-tzinfo-to-sql.h tml
So if it's not clear by now, you store all your dates/times in UTC (convert
them via some script if you didn't start out that way). Then per web page
connection, you read the user's profile TZ (presumably from the user
session object or some other persistent means), execute that SQL statement
above as one of the first things on the page, and "FM" ensues. All your
properly saved mysql rows will display in the LOCAL "timezone" instead of
UTC. You ALSO have to set the TZ in PHP too don't forget or you'll get
whacky discrepencies.
http://php.net/manual/en/function.date-default-timezone-set. php
There's plenty of info on this out there for using PHP & MySQL if that's
what you're using too...
http://www.ferdychristant.com/blog//archive/DOMM-84NEJN
_____
From: Bryan Cantwell [mailto:bcantwell@firescope.com]
Sent: Saturday, October 02, 2010 5:18 AM
To: Daevid Vincent
Cc: mysql@lists.mysql.com
Subject: RE: Any way to change timezone WITHOUT mysqld restart?
As a matter of fact I did, the real question is : Did you even read my
email? I said WITHOUT a restart...
The manual states that a restart of the mysqld is required. The reason for
the post to such a list is because on many occasions, user have suggestions
on some workaround for things that do work in spite of what the manual
says.
On Fri, 2010-10-01 at 15:42 -0700, Daevid Vincent wrote:
Did you even look at the manual?
http://lmgtfy.com/?q=mysql+set+timezone
First link.
> -----Original Message-----
> From: Bryan Cantwell [mailto:bcantwell@firescope.com]
> Sent: Friday, October 01, 2010 10:25 AM
> To: mysql@lists.mysql.com
> Subject: Any way to change timezone WITHOUT mysqld restart?
>
> Any way to change timezone WITHOUT mysqld restart?
> It would be a lifesaver if there were some way for me not to have to
> restart because if mysql restarts then I have to go through a lot of
> other issues with my other apps.
>
>
>
------=_NextPart_000_022D_01CB63E6.210A9280--