Bug #63391 [Com]: [PATCH] Incorrect/inconsistent day of week prior to the year 1600

From: Date: Thu, 28 Nov 2013 09:35:36 +0000
Subject: Bug #63391 [Com]: [PATCH] Incorrect/inconsistent day of week prior to the year 1600
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182979@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63391&edit=1 ID: 63391 Comment by: tcarter at noggin dot com dot au Reported by: tcarter at noggin dot com dot au Summary: [PATCH] Incorrect/inconsistent day of week prior to the year 1600 Status: Feedback Type: Bug Package: Date/time related Operating System: Linux (x86_64) PHP Version: 5.4.8 Block user comment: N Private report: N New Comment: I'm pretty sure https://bugs.php.net/bug.php?id=61599 is the same bug too. Previous Comments: ------------------------------------------------------------------------ [2013-11-28 06:23:21] tcarter at noggin dot com dot au Sorry, forgot to attach the patch, uploaded now. I've tested this (against the linux date command) for every day from the year 0000 to the year 2050 ------------------------------------------------------------------------ [2013-11-27 17:18:51] derick@php.net Your subject seems to have [PATCH] in it, but I can't see where you have that patch. Could you attach it here or provide a link? ------------------------------------------------------------------------ [2012-10-30 01:44:22] tcarter at noggin dot com dot au Description: ------------ PHP timelib calculates the day of the week incorrectly for dates prior to the 1st of January 1600. Test script: --------------- <?php ini_set('date.timezone', 'UTC'); print "Date PHP OS\n"; print "---------- --- ---\n"; $dates = array('1599-12-30', '1599-12-31', '1600-01-01', '1600-01-02'); foreach ($dates as $date) { print strftime( "%Y-%m-%d %a ", strtotime($date) ) . env TZ=UTC date --date=$date +%a; } ?> Expected result: ---------------- Date PHP OS ---------- --- --- 1599-12-30 Thu Thu 1599-12-31 Fri Fri 1600-01-01 Sat Sat 1600-01-02 Sun Sun Actual result: -------------- Date PHP OS ---------- --- --- 1599-12-30 Fri Thu 1599-12-31 Sat Fri 1600-01-01 Sat Sat 1600-01-02 Sun Sun ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63391&edit=1

« previous php.bugs (#182979) next »