|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-05-05 12:11 UTC] rasmus
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 21:00:01 2025 UTC |
Try this on NT: <?echo mktime(0,0,0,1,1,1970)?> I am getting "-1" returned here. I think Microsoft's version of mktime() is not treating the tm_isdst component correctly. According to the Unix man page for mktime it should behave like this: If tm_isdst is positive, the original values are assumed to be in the alternate timezone. If it turns out that the alternate timezone is not valid for the computed calendar time, then the components are adjusted to the main timezone. Likewise, if tm_isdst is zero, the original values are assumed to be in the main timezone and are converted to the alternate timezone if the main timezone is not valid. If tm_isdst is negative, the correct timezone is determined and the components are not adjusted. On Windows it looks like we might have to set tm_isdst to 0 to get the same effect.