Support » Plugin: Event post » Calendar time is at UTC not local time (need to fix)

  • I’m having the same problem a matthewmc.
    The date is displaying as UTC time not local time.
    So events that are tomorrow display as Today. Very misleading and problematic.
    Any help?

    Calendar time is at UTC not local time
    matthewmc (@matthewmc)
    9 months, 3 weeks ago
    WordPress 5.3.2
    Event Post 5.2.5

    WordPress reports the correct UTC and local time (Settings|General). The calendar changes current day on UTC time. I have no other calendar or event plugins.

    In other support search I saw that with WordPress 5.3 it is recommended to no longer use the date_default_timezone_set() function (found at https://wordpress.org/support/topic/timezone-is-off-displaying-utc-on-all-events/ for the same issue with The Events Calendar plugin with a link into Make WordPress Core Date/Time component improvements in WordPress 5.3). My search of my website files shows this function used only in Event Post (eventpost.php line 2666)and a couple in WordPress itself (class-wp-site-health.php in wp-admin/includes, in class-phpmailer.php in wp-includes, and in wp-settings.php in the root.)

    Could this be the issue? According to the support topic for The Events Calendar plugin fixing that function issue fixed their problem, so I don’t know if it is an issue here, too. I have had no other issues with date and time on this website (a completely fresh build of what was a development site.) I did not notice if the issue existed on the dev site but then I had tested several event plugins on that build. I have disabled all plugins and WordPress keeps the correct times and no other plugin in use appears to effect the times in WordPress settings. The Event Post plugin does not effect the WordPress settings times either, but when activated and the calendar widget used the time problem (for current day) is there. There does not appear to be a problem with the event post creation – when I am scheduling an event in a post it shows the correct current day at the same time that the calendar widget is showing the next day.

    Could this be coming from the Event Post plugin?

    Thank you for any assistance.

  • The topic ‘Calendar time is at UTC not local time (need to fix)’ is closed to new replies.