Page 1 of 1
convert timezone
Posted: Wed Jan 21, 2009 1:44 pm
by ddragas
Hi all
can somebody point me in right direction, or even tell me for class or function (that works ok) that can convert date and time from one timezone to another with daylight saving
thank you
kind regards
Re: convert timezone
Posted: Wed Jan 21, 2009 6:21 pm
by JAB Creations
I think this will work for you...change the time zone for your time zone of course which should be like +4:00 or something? I'm not sure off hand.
Code: Select all
$db = mysql_connect("localhost", $truedbuser, $truedbpass);
mysql_query("SET time_zone = '-4:00';");
Re: convert timezone
Posted: Thu Jan 22, 2009 4:25 am
by ddragas
thank you for reply
Re: convert timezone
Posted: Fri Jan 23, 2009 10:48 pm
by Popcorn
don't think that works. it simply sets the timezone of the MySQL session connection, meaning any MySQL fns that are timezone aware will respond offset by 4.
not the same as converting and does not have DST applied.
check
http://mysql.oss.eznetsols.org/doc/refm ... pport.html
and
viewtopic.php?f=19&t=92892&st=0&sk=t&sd=a
Re: convert timezone
Posted: Sat Jan 24, 2009 3:54 am
by ddragas
thank you for reply.
it doesn't have nothing to do with mysql
I've build my own class for converting time
kind regards