WAMP time zone problem

26 02 2008

WAMP doesn’t configure time zone as Apache default installation will do. So, by default it takes GMT 0. If the server is located somewhere else make sure to set the time zone. The list of time zones available here

http://www.php.net/manual/en/timezones.php

This caused me quite pain for 2 hrs today and searching with WAMP time zone problem I didn’t find anything so thought people may need :-)


Actions

Information

5 responses

1 11 2008
rafa

I’m having a problem that might be related to that. I’m new to web developing and trying to learn as much as I can.

I’m running WAMP on Mac OS and can’t find an explanation to why the server’s default timezone sets to Europe/Paris(GMT+1), when my system’s timezone is set to Europe/Lisbon (GMT).

I’m calling the server timezone with the php method date_default_timezone_get()

The strange thing is that when I change my system’s timezone, and refresh the php file, the default server’s timezone updates to a new timezone, which in most cases matches my system’s timezone, and SOMETIMES presents a slight difference, like Lisbon – Paris.

This doesn’t make any sense to me.

I know this is an old post but if you can help i would be most grateful!

1 11 2008
rafa

Edit: it’s actually WAMP I’m running, the OS X equivalent of MAMP

2 11 2008
Raisul Kabir

Hi Rafa,
I believe you will have to set server’s time zone using date_default_timezone_set(), then it should work. Your problem is similar to mine I believe. You might be using a common include.php or config.php, there just set the timezone, then it should be working perfect.

11 10 2009
sulik

yeah this problem is very annoying… the php.ini configuration wont work, but the date_default_timezone_set() will do. its not a problem if your using manual hard coding by just including it in every page, but it a headache when using OSCMS and OS Framework.

6 11 2009
Dave

So what precisely does one do to fix this problem?

Leave a comment