|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3212 getdate() returns incorrect time
Submitted: 2000-01-14 05:48 UTC Modified: 2005-03-30 09:03 UTC
From: nekhoroshkov at novoalbs dot ru Assigned:
Status: Wont fix Package: Other
PHP Version: 3.0.12 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nekhoroshkov at novoalbs dot ru
New email:
PHP Version: OS:


 [2000-01-14 05:48 UTC] nekhoroshkov at novoalbs dot ru
function GetCurrentMinutes($WithZero)
{ $minutes=getdate(time());
  if ($WithZero)  { if ($minutes<10) {$minutes="0".$minutes;}  }
  return $minutes;
function GetCurrentHours($WithZero)
{ $hours=getdate(time());  $hours=$hours["hours"];
   if ($WithZero)  { if ($hours<10) {$hours="0".$hours;} }
 return $hours;

 The function getdate () in any moment (arising very seldom) returns values 0 hours and 0 minutes accordingly 
I tested the given function "rolling" her(it) in cycle from 1 up to 10000. There was no error. But in substantial script 
The error unfortunately arises. By a variable $time the value is assigned only once. She(it) is more anywhere 
The variable $time is reassigned and still in any of the appeals to script receives equal 00:00:00


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-30 09:03 UTC]
We are sorry, but we can not support PHP 3 related problems anymore.
Momentum is gathering for PHP 5, and we think supporting PHP 3 will
lead to a waste of resources which we want to put into getting PHP 5
ready. Of course PHP 4 will continue to be supported for the
forseeable future.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC