Edit report at https://bugs.php.net/bug.php?id=62927&edit=1
ID: 62927 Comment by: andreas at heigl dot org Reported by: dan at chirica dot net Summary: date function peculiar return for 11/04/2012 Status: Open Type: Bug Package: Date/time related Operating System: Linux (Ubuntu 10.4) Mac OS 10.7 PHP Version: 5.3.16 Block user comment: N Private report: N New Comment: I can NOT reproduce the issue on MacOS X 10.7 Here is the output of my console $ php -v PHP 5.3.16 (cli) (built: Aug 17 2012 11:13:15) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans $ cat /tmp/datetest.php <?php $date1 = 1352012400; //$date2 = $date1 + 86400 which should be next day $date2 = 1352098801; echo "date1: " . date ("Y-m-d_h:i:s", $date1) . "\n"; echo "date2: " . date ("Y-m-d_h:i:s", $date2) . "\n"; $ php -f /tmp/datetest.php date1: 2012-11-04_08:00:00 date2: 2012-11-05_08:00:01 Previous Comments: ------------------------------------------------------------------------ [2012-08-24 18:33:29] dan at chirica dot net Description: ------------ --- >From manual page: http://www.php.net/function.date#refsect1-function.date- returnvalues --- Test script: --------------- $date1 = 1352012400; //$date2 = $date1 + 86400 which should be next day $date2 = 1352098801; echo "date1: " . date ("Y-m-d_h:i:s", $date1) . "\n"; echo "date2: " . date ("Y-m-d_h:i:s", $date2) . "\n"; //Output //date1: 2012-11-04_12:00:00 //date2: 2012-11-04_11:00:01 Expected result: ---------------- date1: 2012-11-04_12:00:00 date2: 2012-11-05_12:00:00 Actual result: -------------- //Output //date1: 2012-11-04_12:00:00 //date2: 2012-11-04_11:00:01 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62927&edit=1