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?
It's because of your timezone setting, use gmdate
instead
Try changing the timezone your PHP date() function uses. It's probably +1:00 now.