Event entry date reverts to 1970 when time is set

I am trying to create an event (Getting Physical—White Mountain Geology, Fossils, and Seismology). When I add a start time and publish, the date of the event changes to 1970-01-01 and populates every date of the calendar. I have this site on two test servers and it does not occur on those sites, which are running the same themes and plugins.

  • Predrag Dubajic
    • Support

    Hi cshaffstall,

    Thanks for the additional info however I can't replicate this on your site as well.
    What I did is created new event with start and end dates, added 10 AM and 7 PM times and when I saved the changes the dates weren't changed and only thing that did change is time from AM/PM to 24 hour system.

    Could you give us some additional steps we could try in order to replicate this, or if you could snatch a short video so we can see how it behaves on your end that might help us out to figure what's going on?

    Best regards,
    Predrag

  • cshaffstall
    • Flash Drive

    Instead of creating a new event, please follow the instructions I've given to recreate:

    Go to the event Getting Physical—White Mountain Geology, Fossils, and Seismology

    Uncheck the No start time and No end time and try to enter 10 AM to 7 PM, and save your changes. The start date changes to 1970-01-01

  • Sajid
    • DEV MAN’s Sidekick

    Hi cshaffstall,
    Hope you are doing good today :slight_smile:

    I also could not replicate this issue on your website by following the steps you mentioned. At first, it did not displayed any dates because it were expired/past since it 6 August 2016.

    The only step I added other than the ones you mentioned is changed the date from 6 to 7 August to see the dates (I have restored it back after testing). Like Predrag I could also see the exact same thing. It only change the time from AM/PM (see screenshot).

    It can be a temporary glitch that get resolved its on. If you see this issue again then please let us know so we can dig deeper.

    Take care and have a nice day :slight_smile:

    Best Regards,
    Sajid

  • Sajid
    • DEV MAN’s Sidekick

    Hi cshaffstall,
    Hope you are doing good today :slight_smile:

    On my own localhost site I tried to replicate it with exact same steps and exact same date/time (set my computer date/time back to 5 August) but still unable to replicate this issue (see screenshot).

    However, on second attempt I could replicate this issue on my own site too (regardless of any date 6 7 or 10). I added a space at the end of start time and it converted that time 1970 because of miss configured date/time provided to the date function (yeah PHP is that sensitive).

    So basically it occurs due to a typing mistake. Make sure you don't add any spaces before or after the start or end time.

    But I am still taking it to developer's attention so it could be patched programmatically and ignore any white spaces before or after.

    Meanwhile, don't add any spaces before/after of start/end time.

    Take care and have a nice day :slight_smile:

    Best Regards,
    Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.