#20478 [NEW]: strftime problem with timestamp from 2000-01-01/02

From: Date: Mon, 18 Nov 2002 12:34:40 +0000
Subject: #20478 [NEW]: strftime problem with timestamp from 2000-01-01/02
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-25178@lists.php.net to get a copy of this message
From: thomas.schuessler@michel-consulting.de Operating system: linux PHP version: 4.2.2 PHP Bug Type: Date/time related Bug description: strftime problem with timestamp from 2000-01-01/02 <?php $mysql_date= '2000-01-01'; list($year, $month, $day) = explode('-', $mysql_date); $timestamp = mktime(0,0,0,$month,$day,$year); print 'mysql date:'.$mysql_date.'<br />'; print 'timestamp: '.$timestamp.'<br /><br />'; print 'strftime: '.strftime('%G', $timestamp).'<br />'; print 'date: '.date('Y', $timestamp); ?> prints: mysql date:2000-01-01 timestamp: 946681200 strftime: 1999 <------- WRONG! date: 2000 -- Edit bug report at http://bugs.php.net/?id=20478&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20478&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20478&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20478&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20478&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20478&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20478&r=support Expected behavior: http://bugs.php.net/fix.php?id=20478&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20478&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20478&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20478&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20478&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20478&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20478&r=isapi

« previous php.bugs (#25178) next »