Time Test

This post exists entirely for the sake of tweaking time functionality in Apache, PHP, SQL, and WordPress..

Immediate findings:

  • Date/time limit into the past for WordPress: December 13, 1901 @ 15:45
  • WordPress will display December 13, 1901 @ 15:45 properly for all functions except wp_get_archives
  • All dates prior to 12/13/1901 in MySQL will display as December 31, 1969 @ 19:00 in the WP Admin > Post Timestamp panel
  • SQL timestamps of 0000-00-00 00:00:00 display as 0 via $wpdb->get_col("SELECT DISTINCT YEAR
  • SQL timestamps of 0000-00-00 00:00:00 display link as the current year when permalinks are enabled
  • An SQL timestamp of 1000-00-00 00:00:00 displays link as "1000" and links to the post
  • An SQL timestamp of 1000-00-00 00:00:00 displays correctly in archive view, but incorrectly in Admin and post view
  • An SQL timestamp of 1950-00-00 00:00:00 displays as November 30, 1949 @ 00:00 in WP Admin Post Timestamp panel and elsewhere in WordPress
  • An SQL timestamp of 1950-01-01 01:01:01 displays properly in WP Admin, and elsewhere
  • 0001-01-01 01:01:01 displays as January 01, 2001 @ 01:01 in Admin, links to "1" in archives (404 error)
  • 1000-01-01 01:01:01 displays correctly in archive, as December 31, 1969 @ 15:59 in Admin and post view
  • 3000-01-01 01:01:01 displays correctly in archive, as December 31, 1969 @ 15:59 in Admin, and 404 as post view
  • 2050-01-01 01:01:01 displays correctly in archive, as December 31, 1969 @ 15:59 in Admin, and 404 as post view
  • January 19, 2038 3:14:08 AM GMT is the latest date that will appear correctly in the WP Admin
  • No posts with future date will appear in post view
  • An SQL timestamp of 1900-01-01 01:01:01 displays correctly in daily, monthly, and yearly archive views
  • An SQL timestamp of 1900-01-01 01:01:01 now displays January 18, 2038 @ 19:14 in Admin
  • My head hurts..

More to come.. (much, much later..)