Skip to content

Date.getTimezoneOffset ignores daylight saving time on Windows #112

Closed

Description

@dimensionscape

On Windows getTimezoneOffset computes mktime(localtime) - mktime(gmtime), but gmtime sets tm_isdst = 0, so the UTC fields are read as standard time and the offset never includes DST: in New York in July it returns 300 where Linux and the other targets return 240. The Windows-specific hx_windows_offset, already used for negative times, gives the right value.

Activity

  1. added a commit that references this issue on Oct 15, 2026
    79fc7af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions