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

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

PHP Server Side Scripting Forum

    
Q: date() in the future?
date function not returning system time?
HeadBut

10+ Year Member



 
Msg#: 3074293 posted 2:26 am on Sep 7, 2006 (gmt 0)

This is returning a date 1 hour in the future?

$SBText .= date("F j, Y, g:i a");

How would I fix this?

 

eelixduppy

WebmasterWorld Senior Member eelixduppy us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3074293 posted 2:41 am on Sep 7, 2006 (gmt 0)

It should be returning the local system time. Check the date on your server to see if it is correct. It may also be an issue with your timezone settings.

Good luck!

HeadBut

10+ Year Member



 
Msg#: 3074293 posted 3:20 am on Sep 7, 2006 (gmt 0)

I am using a Mac Powerbook G4 as a development machine with Apache, Mysql and php. The date & Time control panel says the Time Zone: MST and Closest City:Phoenix - USA

The time from php is 1 hour ahead and I seem to remember it was working properly a couple months ago.

Thanks!
M

dreamcatcher

WebmasterWorld Senior Member dreamcatcher us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3074293 posted 6:52 am on Sep 7, 2006 (gmt 0)

$SBText .= date("F j, Y, g:i a", strtotime("-1 hour"));

dc

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