Bug #15455 Updated: date() fails with negative timestamps

From: Date: Fri, 08 Feb 2002 22:47:55 +0000
Subject: Bug #15455 Updated: date() fails with negative timestamps
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-79778@lists.php.net to get a copy of this message
ID: 15455 Updated by: mfischer@php.net Reported By: dgw@qlogic.net Status: Closed Bug Type: Date/time related Operating System: Windows 2000 PHP Version: 4.1.1 New Comment: Just for clarification: "localtime returns a pointer to the structure result. If the value in timer represents a date before midnight, January 1, 1970, localtime returns NULL." - right from the MSDN. And a NULL value can't be used to turn into something meaningful. Previous Comments: ------------------------------------------------------------------------ [2002-02-08 15:29:40] derick@php.net It's a limitation in windows' date routines. I'm afraid we can little do about it for now. Derick ------------------------------------------------------------------------ [2002-02-08 14:45:09] dgw@qlogic.net Simple to reproduce, only on windows: $date = mktime(0,0,0,5,5,1965); echo date('d-m-Y', $date); This happens with timestamps before 01/01/1970 that results in a negative number (like birth dates, for example). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15455&edit=1

« previous php.dev (#79778) next »