Re: Dates before 1970

From: Date: Fri, 14 Apr 2006 03:12:39 +0000
Subject: Re: Dates before 1970
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-233979@lists.php.net to get a copy of this message
Suhas wrote:
Hello, I have a project that deals with the date time stamps since 1900 (and past), any suggestions about a good class that handles Date Time Format before 1970. I really like date() function and want something similar.
date() uses Unix timestamps which on most Unix platforms goes from -MAX_INT to MAX_INT which means the date range is actually 12:45:52 12/13/1901 to 07:14:07 01/18/2038. So you might be able to get away with it. You can check it with: echo date("h:i:s m/d/Y",-2147483648); echo date("h:i:s m/d/Y", 2147483647); Windows, not being Unix, doesn't understand that the timestamp can be negative, although I think someone fixed that in PHP 5. In my 11+ years of PHP I have yet to run PHP on Windows, so I wouldn't know. -Rasmus

« previous php.general (#233979) next »