Skip to content

Wrong time in Netherlands #167

Closed
Closed

Description

@ottopic

In Netherlands does not take into account European summer and wintertime.
For example in Birmingham daylight is at 6:12, Hamburg 6:24 but in the middle Amsterdam is 5:45. Something is wrong

Activity

  1. mourner commented on Jun 18, 2026

    @mourner
    Owner

    DST is actually handled correctly here — the issue is comparing across timezone boundaries. SunCalc returns UTC instants; once you format each in its own zone (which applies summer/winter time automatically), everything lines up:

                UTC      local
    Birmingham  03:44 →  04:44  (BST,  UTC+1)
    Amsterdam   03:17 →  05:17  (CEST, UTC+2)
    Hamburg     02:50 →  04:50  (CEST, UTC+2)
    

    In UTC the times are strictly monotonic west→east, as they must be. The reason Amsterdam's local sunrise is later than Hamburg's is that both are in the same timezone (CEST), but Amsterdam is ~5° further west — so by the clock the sun rises later there. Birmingham only looks earlier because the UK clock is one hour behind. So the "Amsterdam should fall between Birmingham and Hamburg" expectation is what's off; it's a timezone artifact, not a calculation error.

    const sr = SunCalc.getTimes(date, 52.37, 4.90).sunrise;
    sr.toLocaleTimeString('nl-NL', { timeZone: 'Europe/Amsterdam' }); // DST applied automatically

    Closing as a timezone/display matter rather than a bug.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions