- This topic has 3 replies, 2 voices, and was last updated 3 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘Generic’ is closed to new topics and replies.
Events Made Easy › Forums › Generic › [eme_countdown] takes into account the time zone?
Tagged: [eme_countdown] timezone
Hello again @Franky,
I tried the shortcode [eme_countdown] and I noticed that around midnight the number of days is not correct, e.g. at the moment:
Now: November 9th, 10:44 pm (Berlin time zone)
Next event on November 13th, 2021
[eme_countdown]: Next event in [3] days
That should be 4, right?
Best regards
eme_countdown shows the difference in days between now and the mentioned event.
It uses php datetime diffs in the end, and 24 hours are considered a day. So if in your case the event starts on nov 13 but earlier than 10:44 pm, it will be 3 days (and x hours, y minutes etc …)
For a more correct countdown, you can use placeholders too, see https://www.e-dynamics.be/wordpress/event-formatting/ (search for “DATETIMEDIFF”)
Thanks again for the answer. I used the shortcode on a normal WordPress-page. The placeholders don’t work on these pages.
Certainly there was a reason why the “php datetime” difference was used for this, but since only whole days are displayed as a result, wouldn’t a correct calculation of the day be better?
You can use [eme_event] with a template containing those placeholders 🙂
But I do see your problem … I’ll change it for the next version.
From the changelog:
eme_countdown shortcode now shows the difference in days, not taking the hour into account