[wp-hackers] Post dates older than 1.1.1970 - PHP issue

Lynne Pope lynne.pope at gmail.com
Thu Jul 16 01:02:55 UTC 2009


2009/7/16 John Myrstad <john.ivar.myrstad at gmail.com>

> When using the Simili timeline in WordPress its not possible to have posts
> older than 1.1.1970. As I understand this is a PHP issue, but are there any
> workarounds or hacks that may remove the limit ? As I understand its done
> with MovableType or TextPattern.


It's not simply a PHP issue as MySQL, server apps, and operating systems are
also designed to use the UNIX timestamp. The epoch date is 1st January 1970
and all times are calculated as seconds elapsed since the epoch.

One way to get around this in a script is to calculate the required date as
the number of seconds before the epoch and enter this as a negative value.
Here's a calculator that can give you the number:
http://www.unixtimestamp.com/index.php

I've never had any luck with using negative time in WordPress so if you do,
please share!

Lynne


More information about the wp-hackers mailing list