#18779 [Bgs->Opn]: Date("yz") returns wrong julian date
| From: | pdaugherty at cem dot va dot gov | Date: | Wed, 07 Aug 2002 13:21:38 +0000 |
| Subject: | #18779 [Bgs->Opn]: Date("yz") returns wrong julian date | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16165@lists.php.net to get a copy of this message | ||
ID: 18779
User updated by: pdaugherty@cem.va.gov
Reported By: pdaugherty@cem.va.gov
-Status: Bogus
+Status: Open
Bug Type: Date/time related
Operating System: Redhat Linux 7.3 Kernel 2.4.18-5
PHP Version: 4.2.1
New Comment:
But the actual day of the year on August 7th 2002 is 219 not 218. The
format is ok, but the date calculation is wrong.
Previous Comments:
------------------------------------------------------------------------
[2002-08-07 09:12:34] georg@php.net
The result from date("yz") is ok: y=02, and z=218. z is the day of the
year from 0..365 (as described in the documentation).
------------------------------------------------------------------------
[2002-08-07 08:19:32] pdaugherty@cem.va.gov
edit spelling
------------------------------------------------------------------------
[2002-08-07 08:16:33] pdaugherty@cem.va.gov
Date("yz") returns wrong julian date.
For 8/7/02, php funcion 'date("yz")' returns 02218, which is wrong.
Php function 'date("d-M-Y") returns 07-Aug-2002, which is correct. The
shell command "date +%j" returns the proper julian date of 219.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18779&edit=1