With the changes to the way dates are handled in EE 2.6, can dates be set prior to 1900 (or even 1800) using the Date form field?

  • did you find a suitable work around or field type?
    – paulcripps
    Oct 9 '15 at 8:52

So here's what I've found out:

  • EE uses an INT database field to store a UNIX timestamp
  • Because of this, EE can display dates back to about 1901
  • Switching the database field from INT to BIGINT fixes the problem, but can dramatically increase the size of that database table

I discovered the INT vs BIGINT fix through a web search and tested it with success. I submitted a bug report (login required) with EllisLab about it proposing the fix. I am appreciative that they researched it and came to the conclusion that the potential for a dramatically increased database table is not in the best interest of most of its users.

Their solution: create a custom field type using the code from their date field type and changing INT to BIGINT for the newly-created custom field type. That seems both easy enough and reasonable to me.


Yep they can. My emphasis:

Dates and Times Are Easy in ExpressionEngine 2.6

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.

Out of curiosity I just gave it a try and it looks as though EE will save any pre-1970 dates with a negative timestamp:

Negative timestamp

  • Interestingly, it still won't properly display dates prior to December 1901, at least as far as I can tell. It would be nice if EE would use the MYSQL datetime data type instead of an integer field.
    – Brett
    Oct 26 '13 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.