admin管理员组文章数量:1334931
Our site needs a way to order a large number of posts (think +6000). After looking at some plugins I have decided to just use the date field since it is built into wordpress. It's kind of silly, but it will meet our need and hopefully be compatible with any future iterations of the WordPress software or plugins.
Is there a limit to how far back in time posts can be dated? We shouldn't have to go so far back, but I just wanted to check if anyone knew.
Our site needs a way to order a large number of posts (think +6000). After looking at some plugins I have decided to just use the date field since it is built into wordpress. It's kind of silly, but it will meet our need and hopefully be compatible with any future iterations of the WordPress software or plugins.
Is there a limit to how far back in time posts can be dated? We shouldn't have to go so far back, but I just wanted to check if anyone knew.
Share Improve this question asked Jun 29, 2020 at 3:00 HopefullCoderHopefullCoder 456 bronze badges2 Answers
Reset to default 1Almost every PHP date/time function is dealing with the UNIX epoch timestamp, which starts from 00:00:00 UTC on 1 January 1970. So I strongly encourage you not to use dates before 01.01.1970 to avoid incompatibilities with the most of PHP code used by third party plugins.
Wordpress posts table uses DATATIME type for all the date columns and this is the only limit You will face.
From oficial mysql documentation:
The DATETIME type is used for values that contain both date and time parts. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD hh:mm:ss' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
本文标签: Are there any know limitations on the date fieldespecially how old dates can be
版权声明:本文标题:Are there any know limitations on the date field, especially how old dates can be? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742308126a2450329.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论