Welcome to WebmasterWorld Guest from 54.146.221.231

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Q: date() in the future?

date function not returning system time?

     
2:26 am on Sep 7, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 2, 2004
posts:187
votes: 0


This is returning a date 1 hour in the future?

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

How would I fix this?

2:41 am on Sept 7, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 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!

3:20 am on Sept 7, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 2, 2004
posts:187
votes: 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

6:52 am on Sept 7, 2006 (gmt 0)

Senior Member

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

joined:Mar 30, 2003
posts:3719
votes: 0


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

dc