|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-31 07:43 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Mon Jan 12 09:00:01 2026 UTC |
Description: ------------ The following example is relevant. Two dates but with the same hour. Using the date function with the "G" option gives different results even if the hours are the same. Reproduce code: --------------- <? $D = mktime(0,0,0,3,29,2004,0); $DM1 = mktime(0,0,0,3,28,2004,0); echo "$D<br>$DM1<br>"; $Hour = date("G",$D); $HourM1 = date("G",$DM1); echo "$Hour<br>$HourM1"; ?> Expected result: ---------------- 0 0 Actual result: -------------- 1 0