Re: Timestamps for 1800's
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Timestamps for 1800's

From: Colin McKinnon <colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com>
Date: Wed Jul 20 2005 - 22:39:09 CEST

DJ Craig spilled the following:

> I'm trying to convert this date:
> 12 May1868
> Into this:
> 18690512
> That's YYYYMMDD. So first I need to convert it to a UNIX time stamp
> using the strtotime() function, then convert it to YYYYMMDD. This
> works for more rescent dates:
> $d = date('Ymd', strtotime($d));
> I tested that with 19 July2005, and it worked. But the strtotime()
> function seems to return -1 for dates before the UNIX epoch. How can I
> convert these dates?

32bit Unix time only works from 1970 to 2036 (ish)

C.
Received on Mon Oct 17 21:12:58 2005