homepage Welcome to WebmasterWorld Guest from 54.225.1.70
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
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...

Nick

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved