Skip to content

fix(timeline): preserve historical calendar years in UTC offsets - #755

Open
outlier27-cell wants to merge 5 commits into
tt-a1i:devfrom
outlier27-cell:fix/timeline-early-year
Open

outlier27-cell wants to merge 5 commits into
tt-a1i:devfrom
outlier27-cell:fix/timeline-early-year

Conversation

@outlier27-cell

@outlier27-cell outlier27-cell commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem and value

Fixes #753.

Timeline accepted historical timestamps but calculated impossible UTC offsets because Date.UTC remaps years 0-99. Construct the wall-clock UTC date with setUTCFullYear, and include era when reading Intl parts so ISO year zero is represented correctly.

Stability impact

Local Timeline date formatting. Normal date, event ordering, axis positioning, and timezone choices remain unchanged. Historical valid dates now show the actual offset instead of thousands of hours.

Tests run

  • Base reproduction at 61425f56: year 0001 in UTC renders offset UTC+16655040:00.
  • node --test test/timeline-rendering.test.mjs: 10/10 passed on candidate, including years 0000, 0001, 0099, 0100, and 2026, existing timezone cases, and public examples through the showcase checker.
  • Final-head remote CI required. The correction is a deterministic text value; no geometry changes or browser/perceptual pass are claimed.

Generated artifacts

archify.zip rebuilt from tracked candidate source using official Node 22. Modern bundled example inputs are unchanged.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⛔ Files ignored due to path filters (1)
  • archify.zip is excluded by !**/*.zip
⚙️ Run configuration
  • Configuration used: Repository: tt-a1i/archify/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 66778052-270a-46b8-8f1f-39aaac2353b1
📥 Commits

Reviewing files that changed from the base of the PR and between 55a44e7 and 793957e.

⛔ Files ignored due to path filters (1)
  • archify.zip is excluded by !**/*.zip

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: tt-a1i/archify/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 774dfa36-ee41-4bc0-8f0f-5b218371fb6d
📥 Commits

Reviewing files that changed from the base of the PR and between 70a6dfa and 943914a.

⛔ Files ignored due to path filters (1)
  • archify.zip is excluded by !**/*.zip
📒 Files selected for processing (2)
  • archify/renderers/timeline/render-timeline.mjs
  • test/timeline-rendering.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Summary

Historical timestamps in years 0000–0099 could produce impossible UTC offsets because Date.UTC remaps years 0–99. The change preserves those years with setUTCFullYear and handles BC eras from Intl.DateTimeFormat; normal date formatting, event ordering, axis positioning, and timezone choices remain unchanged.

The reviewed base/head and CI status are not supplied. The author reports 10/10 tests on the candidate, but the tested revision is not identified here. No browser or perceptual acceptance is claimed.

Walkthrough

Timezone formatting now requests an era and converts BC years to astronomical year numbering. Offset calculation uses date setters to preserve years below 100. A rendering regression test checks UTC output for years 0000, 0001, 0099, 0100, and 2026.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 94391

The change addresses historical-year UTC offset formatting. No supported issue remains that should prevent merging.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Contribution Scope ✅ Passed The PR meets the contribution-scope requirements. It gives a concrete base reproduction for years 0000–0099, states the intended UTC-offset correction, and limits the implementation to timeline format…
Validation Evidence ✅ Passed Evidence coverage is sufficient for the reviewed head 943914a against base f4c8f3d. The source diff changes historical-year era handli…
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/timeline-early-year
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@outlier27-cell

Copy link
Copy Markdown
Contributor Author

@tt-a1i This PR is ready for review at head 793957e. All applicable CI checks pass, GitHub reports no merge conflicts, and there are no unresolved review threads. The review feedback received so far has been addressed. Could you review it when convenient? Thank you.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant