RE: [PHP] Problem with strtotime()

From: Date: Wed, 04 Jun 2003 02:19:05 +0000
Subject: RE: [PHP] Problem with strtotime()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-150096@lists.php.net to get a copy of this message
> I am not sure if this is a PHP problem. I am using strtotime() to convert > date string to timestamp. But this function fails with date prior to 1970. > The documentation however says that range is Fri, 13 Dec 1901 20:45:54 GMT > to Tue, 19 Jan 2038 03:14:07 GMT Actually it says it's "typically" within that range. If you're on windows, though, negative timestamps aren't supported, IIRC. > To be specific strtotime("2003/05/04") works fine, but > strtotime("1966/05/04") returns -1 > > I face the same problem with mktime(). > > Is there any way to get a valid timestamp for dates before 1970 ?? ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#150096) next »