Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
Telling the time in PHP adjusting for different time zones dvduval msg:1260436 12:51 pm on Aug 5, 2002 (gmt 0) I now have my site telling the time, but the only problem is that it is in GMT and I need Eastern Standard Time. Can someone help me adjust my time? (I'm pretty new at this) Current script looks like this: <?php echo gmdate("M d Y"); ?>
jatar_k msg:1260437 4:04 pm on Aug 5, 2002 (gmt 0)
The first question is are you actually in EST, if you are you can just use date() instead of gmdate().
You can look at the
date function [ php.net]
If you are not in EST then you will have to convert and this may take a little more work.
Nick_W msg:1260438 4:08 pm on Aug 5, 2002 (gmt 0)
Also check out the set_locale() function in the manual, I think you can do what you need with that...