Server time
Moderator: General Moderators
Server time
I'm using the time() function to create the time a message is entered but it's coming out 1 hour ahead, i'm on GMT time so not sure why it's doing this any ideas?
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Hmmm.... I pretty certain that time() produces the GMT timestamp. Most of the other date functions do actually return the server's date/time by correcting the timezone (unless you use gmdate() etc.), I've been confused by this in the past. Either you're using date() or another date function to actually display the timestamp readibly and it's converting it for you, or your server timezone is set incorrectly. Perhaps daylight-savings could somehow be affecting it too.
See: http://www.php.net/time
< Simon >
See: http://www.php.net/time
< Simon >