Skip to content

Time.here is missing eras #124

@sldab

Description

@sldab

Problem

Time.here captures the current timezone offset with an empty eras list [].

Impact

When you're in CET (UTC+1, winter), it creates a zone fixed at +60 minutes. Displaying a summer date (which should use CEST, UTC+2) still uses +60 minutes => off by one hour.

Proposed solution

Get the user's timezone with past and future DST era information in the Kernel's JS code by scanning monthly from 1970 to 2100 and calling getTimezoneOffset() repeatedly to detect DST transitions:
https://github.com/gren-lang/core/blob/main/src/Gren/Kernel/Time.js#L25C1-L33C2

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