Custom time placeholder timezone issue?
-
Hi
I’m trying to setup custom start and end time placeholders in ISO 8601 format.That should be as simple as #c and #@c, according to the docs.
However, when I use them in the Single event page format, it appears in the correct format but the timezone is my WordPress default, and not the timezone of the event.
For example, my WordPress default is UTC+3 currently due to DST. I have a test event that is UTC+8.
If I use #c, I get 2020-05-05T13:00:00+03:00 when I was expecting 2020-05-05T13:00:00+08:00.
If I hack classes\em-event.php – which I prefer not to do, the docs’ solution is much more elegant and needs no maintenance – I can add a case such as:
case '#_EVENTISO8601STARTDATE': $replace = $this->start()->format('c'); break;
Using #_EVENTISO8601STARTDATE gives 2020-05-05T13:00:00+08:00.
Is this a bug or something else?
Thanks for an amazing plugin
Jacob
- The topic ‘Custom time placeholder timezone issue?’ is closed to new replies.