getdate and date
From: Joost Wilbrink (joost_at_wilbrink.ws)
Date: 02/25/05
- Next message: Michael Fesser: "Re: Question about MySQL performance and the handling of records"
- Previous message: Bonge Boo!: "Stupid $_SESSION question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Feb 2005 11:34:54 +0100
Hello,
I have discovered something strange on my server related to gmt timestamp
handling in php.
When I take a gmt timestamp with:
$gmt_timestamp = gmmktime();
print date("h:i", $gmt_timestamp);
It prints the gmt time correctly (the server is located gmt -6 timezone)
But when I do:
$timearray = getdate($gmt_timestamp);
print_r($timearray);
It gives me the gmt time 12 hours back, for example when the gmt time is
10:30 am, then it gives me 22:30 and also the date of the previous day :-s
Can someone helps me what the possible cause of this can be?
Thanks
Best regards
Joost
- Next message: Michael Fesser: "Re: Question about MySQL performance and the handling of records"
- Previous message: Bonge Boo!: "Stupid $_SESSION question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|