PDA

View Full Version : Problem with MySQL timezone?


FethrdWlf
04-09-2011, 12:39 AM
So, I have a website based out of Zymic.com (http://www.zymic.com), but their MySQL servers are running off of GMT (Greenwich Mean Time), and I'm in the U.S. . I'm having posts be loaded from a database. The only problem is, I'm in -?:00 time (replace ? with a #) and the time looks totally off to me. How can I change it to display the time I uploaded where I am, and then change accordingly to wherever someone else may be?

Here's a link to the website for reference:
http://fethrdwlf.zxq.net/ (http://fethrdwlf.zxq.net)

davidj
04-13-2011, 01:16 PM
if you have access to the code base then just tweak the date() function to reflect your time difference.



$hour = date("h")+ 4;

FethrdWlf
04-14-2011, 12:28 AM
if you have access to the code base then just tweak the date() function to reflect your time difference.



$hour = date("h")+ 4;



I do have access to it, but will it work when I'm including the month, date, and year?

So, I'm working with code like this:
$date = date('F j, Y g:i A', strtotime($row['dateposted']));
But it's displaying the hour (g) in GMT...