[TYPO3-dev] timestamps and dates before 1970
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Thu Jan 5 14:52:27 CET 2006
Martin Seebach schrieb:
>
> If I recall correctly, this discussion was on how arbitrary dates could
> be stored (eg. also historic and science fiction events), and there was
> never any real consensus.
> But solely for birthday purposes, the PHP-way must be the official way:
>
> $ php -r 'print(strtotime("1960-12-21 23:10:15")."\n");'
> -284867385
> $ php -r 'print(date("Y-m-d H:i:s",-284867385)."\n");'
> 1960-12-21 23:10:15
>
> This works back to sometime in 1901.
This uses negative Unix epoch which doesn't work on all platforms.
That's why there was a discussion.
Masi
More information about the TYPO3-dev
mailing list