Incorrect timezone offset when formatting time
-
I’m trying to format a date in ISO 8601 format for posts within the loop using
datetime="<?php the_time('c'); ?>"
.My timezone is set to Toronto, which is UTC-0400, but the output I get is
2010-03-21T03:12:00+00:00
. It’s the correct date/time for the post (which are posting correctly with the date/time for my timezone) but without the correct timezone offset.When I use
the_time('P')
I get the same problem. Does anyone know why it’s not honouring my set timezone offset, and instead reverting to UTC time when I ask for the timezone offset?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Incorrect timezone offset when formatting time’ is closed to new replies.