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

- Thread: https://externals.io/message/8467
- Original archive: https://news-web.php.net/php.internals/8467
- Started by Scott MacVicar on 2004-03-09T14:56:11+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #8467 — Scott MacVicar — 2004-03-09T14:56:11+00:00

URL: https://externals.io/message/8467#8467

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

---

## #8497 — Scott MacVicar — 2004-03-12T15:16:47+00:00

URL: https://externals.io/message/8467#8497 · In reply to: #8467

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:
> 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
