[wp-trac] [WordPress Trac] #49879: Can't create or save post if post date is less than 13 Dec 1901

WordPress Trac noreply at wordpress.org
Mon Apr 13 05:33:47 UTC 2020


#49879: Can't create or save post if post date is less than 13 Dec 1901
---------------------------+------------------------------
 Reporter:  dranilsinghal  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Date/Time      |     Version:  5.4
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by Rarst):

 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
 [https://wordpress.stackexchange.com/a/115743/847 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 edge
 case one.

 My personal recommendation, for a private site, is too 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49879#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list