• The calendar on the left sidebar is displaying dates one day later than they should be even if that date isn’t real (An event for Aug 29 is showing for Aug 30, an event for Aug 31 is showing up for Aug 32). If you inspect the calendar element it has the correct date and time associated and it displays those for a moment but then after everything loads it changes to the wrong date. I’m not sure what could be causing this.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author anmari

    (@anmari)

    Hi – well that’s kinda disturbing – Especially since there is no Aug 32!
    I used your ics file (https://www.gocathedral.com/calendar/calendar_1674.ics) here https://test.icalevents.com/agenda/ics-test/ and as you can see
    I cannot recreate the problem. I guessed at a timezone of UTC-5 since the gocathedral.com site says it is in indianapolis, but even so as expected it has ‘correct’ looking days. That August 29 event is now showing on your site as Aug 31.

    My local test site also handles the dates correctly.

    The plugin uses PHP datetime functionality where PHP does the date maths and the timezone changes. I’ve never seen it calculate a day of month that does not exist!

    SO the question is what is different about that site?

    If you have anything else at all doing anything about dates, times, or timezones please temporarily deactivate and re-test.
    If that doesn’t help then temporarily deactivate ALL plugins, you may have to do the theme too in case it has functionality messing with date calcs, and of course check for any ‘must-use’ plugins that may have hack code.
    Check what php version your host is running – how old is it? and maybe query if they have any strange non standard datetime functionality.

    Do let me know what you find.

    https://webdesign.anmari.com/2490/debug-a-wordpress-plugin-or-theme-for-non-devleopers/
    https://webdesign.anmari.com/2932/debugging-a-possible-clash-between-plugins-andor-a-theme/

    Aside: the ics file is not incredibly well formed. It is using ‘floating date & times’ – IE it doesn’t indicate any timezone. This is not serious, just not great practice. If someone in another timezone used that file, they’d get the same ‘floating’ o’clock in their zone, instead of the time adjusted by the timezone. https://icalevents.com/2064-ical-local-or-floating-date-times/
    What’s also weird is that the ‘abbr’ underneath the dates is different. It’s showing as eg: 2017-08-31T00:00:00-04:00 while my sites have
    2017-08-31T00:00:00+00:00. This may be related to whatever code is causing a aug 32 to be generated.

Viewing 1 replies (of 1 total)
  • The topic ‘Displaying 1 Day Off’ is closed to new replies.