Reputation: 731
I am using the date function to get formatted time for timestamps between 0 and 86400. Therefore I expect to get 12:00am for timestamp 0, but instead I get 1:00am. Can anyone tell me why this is happening?
Upvotes: 0
Views: 49
Reputation: 2093
Try changing the timezone your PHP date() function uses. It's probably +1:00 now.
Upvotes: 1
Reputation: 29462
It's because of your timezone setting, use gmdate
instead
Upvotes: 1