gmmktime on windows ends an hour out on the night DST takes affect

php.internals

Scott MacVicar

22 years ago
Hi, I think this is a bug from the depths of Redmond since it takes an hour off ta->tm_hour but doesn't set ta->tm_isdst, its fairly significant and can be fixed with a small change. If someone with karma could apply the patch in http://bugs.php.net/bug.php?id=27533 Patch basically forces it to make the hour 02:01:01 instead of 01:01:01 which resolves the isssue. Thanks, Scott

Scott MacVicar

22 years ago
Attached is a simply C++ file demonstrating this problem, i suspect that its to do with the fact that the US starts DST at 2am and EU at 1am as for the whole hour 1am - 2am UTC the value of is_dst is 0, i reported this bug to Microsoft today. I've also attached the patch which makes the time for performing mktime to 2:01:01 instead of 01:01:01 and this corrects the issue. Thanks, Scott Scott Macvicar wrote: