0

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.

2 Answers 2

1

Almost 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.

1

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'.

1
  • Great! I would have never found that. Jun 29, 2020 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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