Entry

Dates and Times Are Easy in ExpressionEngine 2.6

by: Kevin Cupp on: 4/10/2013

ExpressionEngine 2.6 is coming soon, and choosing whether or not you are observing Daylight Saving Time in ExpressionEngine will be a thing of the past. With the new PHP version requirements for ExpressionEngine, we were able to take advantage of more modern date handling techniques to eliminate the DST setting all together. All you will have to do is choose your timezone and we’ll take care of the rest.

Along with this upgrade, you now have new ways to enter dates in any ExpressionEngine Date field. These are perfectly valid date formats accepted by the Date field:

  • tomorrow 10am
  • noon yesterday
  • 5 days ago
  • last day of next month
  • 2 fortnights

See what else you can do with relative date formats.

Technical Info

ExpressionEngine’s Localize Class has been completely rewritten to use PHP’s DateTime classes. This allows us to take an object-oriented approach to date handling and reliably localize a date and time to any timezone of our choosing, thus also taking care of any DST rules automatically.

The documentation for the new Localize Class will go live along with the release of ExpressionEngine 2.6, and you’ll find the API has been greatly simplified. We strongly encourage add-on developers update their add-ons to use the latest API for the most accurate and reliable date handling.

Dates will still be stored in the database as Unix timestamps for the time being while it offers the best performance advantages under MySQL, so no need to change your add-ons there. But don’t let that stop you entering dates pre-January 1, 1970, ExpressionEngine will handle it just fine.

.(JavaScript must be enabled to view this email address) or share your feedback on this entry with @ellislab on Twitter.

ExpressionEngine News

#eecms, #events, #releases