gren-lang / gren-lang/core

Time.here is missing eras

Open
#124 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
48
Forks
14
Avg merge
4h 14m
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Gren/Kernel/Time.js at the linked timezone code and trace how Time.here constructs its eras list. Check the monthly offset scan from 1970 to 2100 and verify completion with CET winter and summer dates, where the offsets should differ by one hour.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.