Bug #68531 [Opn->Fbk]: getdate() new minutes

From: Date: Mon, 31 Aug 2015 13:44:25 +0000
Subject: Bug #68531 [Opn->Fbk]: getdate() new minutes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195650@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68531&edit=1 ID: 68531 Updated by: cmb@php.net Reported by: raphaelfox at orange dot fr Summary: getdate() new minutes -Status: Open +Status: Feedback Type: Bug -Package: date_time +Package: Date/time related PHP Version: 5.5Git-2014-12-01 (snap) -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Something like <https://3v4l.org/od0eB> would be a proper reproducing script, but it doesn't show the misbehavior you've found. Previous Comments: ------------------------------------------------------------------------ [2014-12-01 06:06:20] raphaelfox at orange dot fr Description: ------------ --- From manual page: http://www.php.net/function.getdate --- getdate() when new minute put the second to 0(normal) but the minutes to 1 in the array result. doesn't appear with timestamp parameter. Test script: --------------- $today = getdate(); if ($today['hours'] != 6 || $today['minutes'] < 49 || ($today['minutes'] = 49 && $today['seconds'] < 30 && (!($today['minutes'] = 1 && $today['seconds'] = 0)))) { print_r($today); } Expected result: ---------------- Array ( [seconds] => 0 [minutes] => 54 [hours] => 6 [mday] => 1 [wday] => 1 [mon] => 12 [year] => 2014 [yday] => 334 [weekday] => Monday [month] => December [0] => 1417413240 ) Actual result: -------------- Array ( [seconds] => 0 [minutes] => 1 [hours] => 6 [mday] => 1 [wday] => 1 [mon] => 12 [year] => 2014 [yday] => 334 [weekday] => Monday [month] => December [0] => 1417413240 ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68531&edit=1

« previous php.bugs (#195650) next »