|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-26 11:21 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 13:00:01 2025 UTC |
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