[PHP] Re: date() before 1 Jan 1970...

2004-03-08 Thread Ben Ramsey
Ben Ramsey wrote: $old_date = mktime(0, 11, 18, 1, 1, 1903); echo date("Y-m-d H:i:s", $old_date); Argh! I had the numbers reversed. It should be: $old_date = mktime(18, 11, 0, 1, 1, 1903); But you get the idea... -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/Peo

[PHP] Re: date() before 1 Jan 1970...

2004-03-08 Thread Ben Ramsey
Check out the manual: http://www.php.net/strtotime Theoretically, this should work: $old_date = strtotime("January 1, 1903 18:11 pm"); echo date("Y-m-d H:i:s", $old_date); But all that echoes is: 1969-12-31 18:59:59 On that manual page, you'll see the following note: Note: The valid range of a t