#40116 [Opn]: using gregorian to jeulian to unix timestamp in date is wonky

From: Date: Sat, 13 Jan 2007 16:45:46 +0000
Subject: #40116 [Opn]: using gregorian to jeulian to unix timestamp in date is wonky
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-107568@lists.php.net to get a copy of this message
ID: 40116 User updated by: marsh dot wayne at gmail dot com Reported By: marsh dot wayne at gmail dot com Status: Open Bug Type: Calendar related Operating System: Windows 2000 SP4 PHP Version: 5.2.0 New Comment: Seems to be an issue on how the functions return the timestamp. I don't think this is the issue as it takes up to 15 days, and not the difference of GMT vs local time, to make the proper month output. Previous Comments: ------------------------------------------------------------------------ [2007-01-13 03:59:41] marsh dot wayne at gmail dot com Description: ------------ I do believe this issue is with date. None of the bugs that appeared seemed to say the issue was resolved. I will install latest cvs and see if that resolves the issue and then update the bug issue. Reproduce code: --------------- <?php error_reporting(E_ALL); for($x = 1; $x < 13; $x++ ){ echo date("F", jdtounix(GregorianToJD( $x, 1 ,2008 )))." - ".$x."<br />"; } ?> Expected result: ---------------- January - 1 February - 2 March - 3 April - 4 May - 5 June - 6 July - 7 August - 8 September - 9 October - 10 November - 11 December - 12 Actual result: -------------- December - 1 January - 2 February - 3 March - 4 April - 5 May - 6 June - 7 July - 8 August - 9 September - 10 October - 11 November - 12 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40116&edit=1

« previous php.bugs (#107568) next »