Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Date is one day too early

Hello,

I'm seeing a persistent bug where the events I create are shown as one day earlier than what I set.

and thank you for creating this plug in!

Comments

  • I have noticed the same issue. How do we correct that?

  • I did a lot of inspection and I see this happens when you have a different timezone set for Vanilla.

    Basically the event date is stored and displayed at time 00:00:00 for the date specified. So if you're in a timezone that has time earlier than the one for Vanilla, when creating the event, then the date displayed will be earlier than the start of the day you set.

    I did a quick hack so that the date displayed reflects 12 noon, which at least in my case is more than enough time to compensate for the TZ difference.

    I added this to the function displayEventDate inside the if ($EventDate)

    $EventDate = "$EventDate 12:00:00";

    This should be harmless because it only changes the display.

  • LincLinc Detroit Admin
    edited March 2017

    It is indeed a timezone error, specifically from crossing the Daylight Savings Time threshold (well, that's my hypothesis anyway based on similar issues I've seen in this area).

    That hack is... a hack. :) That's only enough proverbial duct tape to hold together for folks in a nearby timezone (+/- 10 hours or so). What you really need to do is accommodate for DST in the user's hour offset when applicable. That's a bit more complicated but it will make it bulletproof.

Sign In or Register to comment.