Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Set MySQL's timezone to GMT or do PHP & MySQL disagree on timezone?

6:18 am on Aug 19, 2010 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 26, 2004
posts: 3143
votes: 12

I'm currently trying to have set my database to record everything as GMT time and then convert it to other time zones through PHP. The problem is that PHP and MySQL seem to disagree by an hour of time about what time it really is. In MySQL to get it to match I have to do the following...

$query = "SET time_zone = '+1:00';"

Also wouldn't GMT be +0:00? Is London time not GMT? I'd really appreciate some clarification. :)

- John
1:44 pm on Aug 20, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
votes: 0

British Summer Time starts the last Sunday in March and ends the last Sunday in October, at 1 am Greenwich Mean Time. The rest of the year they are on GMT.

Instead of using London time, just use GMT (from the manual [php.net]):


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members