WPCalendar Status 2021-07-27

Do you want me to say some swear words? UTC, timezone… If you’ve ever worked with dates in programming, you’ll know it’s a pretty big mess.

For some time now there has been UTC (Universal Time Coordinated) which is a time that anyone on the planet can take a date/time and add or subtract their time zone to it.

With events, there is not much difference. Depending on where your event is, you will have one time or another, and Meetup or WordCamp events have the local times of the place where they are going to be held.

What happens when a project is global? Those hours are not useful, especially if we talk about online events, because the time of the event, for example Barcelona -ES-, has 6 hours difference with a person who is in, for example, Miami -US-.

Today’s work has been to standardize the event times from the new API to, once again, end up using the “time” from 1970-01-01 00:00:00, that is, the seconds since that date … saving this information, it doesn’t matter what time you have, because it can be calculated.

  • Dedicated time: 2 hours.
  • Accumulated time: 8 hours.