You can read this article too:
http://www.modwest.com
Main Topics
Browse All TopicsHi,
Server set up is: Windows Server 2003, Apache, MySQL and PHP
Server is set up in America/New_York and local time always shows correctly in server time clock.
When I use simple date function to echo time, some times it is correct and some times it is 4 Hrs plus.
Actualy America/New_york time zone is -4:00 GMT these days.
Sometimes when I use Date function I get time which is 4 hrs forward that is GMT time, I just restart apache and then same date function gives me exact local time.
Example: Lets say it is 7:00 AM in America/New_York
Some times date(H:i:s) function gives me 11:00:00
and when I restart apache, it starts showing correctly again that is 07:00:00 AM
I am unable to locate what the problem is, please help.
Regards,
Tripat
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You can read this article too:
http://www.modwest.com
I have tried using date("H:i:s T");
and it does dislay GMT in end so it means, somehow time zone is setting back to GMT, but I am unable to find out from where.
I tried using date_default_timezone_set(
Any suggestions, where I should look now?
Also, there are no cron job set on server.
Regards,
Tripat
Business Accounts
Answer for Membership
by: gr8gonzoPosted on 2009-08-07 at 07:17:05ID: 25042889
Next time it happens, try running the date() command with the timezone, too:
) to try to force the timezone back to what it was, and then see if it sticks.
en/functio n.date-def ault-timez one- set.ph p
date("H:i:s T");
See if the timezone reported is different. If so, I'd search through all your PHP scripts on your system for references to changing the timezone. You could also use date_default_timezone_set(
(I'd also try to pay attention to any patterns. For example, is there a pretty specific time where the timezone changes? Maybe exactly every 2 hours or something? If so, look at your crontab for any PHP scripts to see if they modify the timezone.)
http://us2.php.net/manual/