Skip to content
Advertisement

Tag: datetime

gmdate 12 hours off

I’m trying to get the GMT to send with an API request however my time is off from the actual GMT. Right now the GMT is 6:40 PM Friday, November 20, 2020. However when I run gmdate(“Y-m-dTh:i:sZ&…

Weird behavior PHP DateTime and DateTimeZone

PHP DateTime and DateTimeZone works incorrectly for me around DST change dates. I wrote a simple function to convert local time to UTC and I called it with the midnight time from the 24th of Oct to the 2nd of Nov with the timezones Europe/Paris and CET: The output: For Europe/Paris I got the changed DST instead of the 31st

PHP Datetime Formatting

I am using an external API to fetch data on posts and its publish date format seems unusual: “created_at” : “Mon Jul 27 14:30:53 -0500 2020” I can pretty know when it was …

Advertisement