ID:          37187
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:      Open
+Status:      Bogus
 Bug Type:    Documentation problem
 PHP Version: Irrelevant
 New Comment:

Timestamp is always the number of seconds since 1970-01-01 00:00:00 GMT
independent on function. You didn't specify your timezone, but in +01:00
mktime(1, 0, 0, 1, 1, 1970) correctly returns 0 and mktime(1, 0, 0, 1,
1, 1970) returns 3600.


Previous Comments:
------------------------------------------------------------------------

[2006-04-24 18:35:58] [EMAIL PROTECTED]

Description:
------------
The manual entry above is wrong.  The statement:
"Identical to mktime() except the passed parameters represents a GMT
date."
should read
"Identical to mktime() except the timestamp produced represents a GMT
date."

Here is a test case:
<?
// Assume month/day/year are set to today
$x = gmmktime(gmdate('H'),gmdate('i'),gmdate('s'),$month,$day,$year);
print ($x >= gmmktime()) ? "Yes" : "No";
?>
This produces "Yes" as the answer.  Changing it to:
<?
// Assume month/day/year are set to today
$x = gmmktime(date('H'),date('i'),date('s'),$month,$day,$year);
print ($x >= gmmktime()) ? "Yes" : "No";
?>
Produces the expected answer of "No"

Reproduce code:
---------------
<?
// Assume month/day/year are set to today
$x = gmmktime(gmdate('H'),gmdate('i'),gmdate('s'),$month,$day,$year);
print ($x >= gmmktime()) ? "Yes" : "No";
?>

Expected result:
----------------
No

Actual result:
--------------
Yes


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37187&edit=1

Reply via email to