WordPress breaks time (and how to fix it)

A presentation at WordCamp Retreat Soltau 2018 in in 29614 Soltau, Germany by Andrey Savchenko

Date/Time component of WordPress core dates back to ancient PHP 4 times.

As result work with dates, times, and timezones is full of pitfalls. Trivial actions in admin and code can lead to massive errors in output of time information. Errors that will confuse both people and software.

The talk will summarize years of experience with bugs and edge cases in Date/Time component. Point out the most common (and trivial to make!) errors. Provide practical solutions for robust development and output practices.

Video

Resources

The following resources were mentioned during the presentation or are useful additional information.

  • Slides

    Original slides for the presentation.

  • Guide to Date and Time Programming

    If your development involves working with dates and times, then this book is a must-have. In this book, Derick Rethans (contributor to PHP’s core date extension and well-known PHP expert) explores in great detail the subtle nuances of working with dates and times.

  • WpDateTime

    Extension of PHP’s DateTime and DateTimeZone classes for WordPress context.

Buzz and feedback

Here’s what was said about this presentation on social media.