<moderators note> We write our responses below the original email in this list group.
From: php-list@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of James Keeline Sent: March 2, 2008 8:56 PM To: php-list@yahoogroups.com Subject: Re: [php-list] Date/Time Offset --- Ian <[EMAIL PROTECTED] <mailto:iarp%40cogeco.ca> > wrote: > I've spent most of today reading up on PHP and on problem i have so > far is my MySQL server's timezone is at 0000hours and i need it to > save the info as -0500hours. I read on php.net using Z and then like > -0500 but nothing works for me, every registration i do keeps saving > in 0000hrs. Anyway to offset to DATETIME to the -0500hrs needed? > > $query = "INSERT INTO users (first_name, last_name, email, password, > registration_date) VALUES ('$fn', '$ln', '$e', SHA('$p'), NOW())"; My experiences have suggested that the time stored for MySQL fields is based on the server time. What is your server's time zone setting? James -------------------- James, The servers current time is March 3rd 2008 3am putting that somewhere in Europe I think, I was kind of hoping there was a way to put in negative times with php. Like you see on forum boards you can choose what timezone you want shown, that kind of things fine as well but it's the formatting it to show my timezone that I don't know how to do. Thanks Ian R-P