#49879 closed defect (bug) (wontfix)
Can't create or save post if post date is less than 13 Dec 1901
Reported by: | dranilsinghal | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.4 |
Component: | Date/Time | Keywords: | |
Focuses: | Cc: |
Description
Hi
I just noticed that wordpress 5.4 can't create or save post if post date is less than 13 Dec 1901, and can't display the post date if post date is less than 14 Dec 1901.
Please check...
Change History (5)
Note: See
TracTickets for help on using
tickets.
This is a very interesting topic, since post dates possible in WP are determined by a complex intersection of MySQL, PHP, and WP's own limitations. I had enumerated date limitations extensively in the past.
The one specific 1901 limit you observe to is caused by a lowest possible negative integer timestamp on 32-bit PHP. It should go away on 64-bit PHP installation, but you would still hit other limits.
Effectively WP isn’t engineered for working with backdated historical posts. I think it's a valid and interesting use case, but also a very niche one.
My personal recommendation, for a private site, is to store historical dates as custom fields and handle them with your own code.
At the moment there is no explicit intention to support or not support them in core.