Skip to content

fix(my-timezone): clarify solar time semantics and fix stale API names#1158

Merged
ffflorian merged 1 commit intomainfrom
my-timezone/solar-time-clarification
Mar 28, 2026
Merged

fix(my-timezone): clarify solar time semantics and fix stale API names#1158
ffflorian merged 1 commit intomainfrom
my-timezone/solar-time-clarification

Conversation

@ffflorian
Copy link
Copy Markdown
Owner

Summary

  • Reword README and package.json description to make clear the package calculates local mean time (solar time based on longitude), not political timezone data (UTC offsets, DST, etc.)
  • Fix stale method names in README examples (getTimeByAddressgetDateByAddress, getTimeByLocationgetDateByLongitude)
  • Add deterministic offset tests using vi.useFakeTimers() that verify the core math: 0°=UTC, ±90°=±6h, ±180°=±12h, and that each degree equals exactly 4 minutes of offset

Test plan

  • yarn workspace my-timezone test passes (9 tests)

…s in docs

- Reword README and package description to make clear this calculates
  local mean time (solar time), not political timezone data
- Fix stale method names in README examples (getTimeByAddress →
  getDateByAddress, getTimeByLocation → getDateByLongitude)
- Add deterministic offset tests using fake timers that verify the core
  solar-time math (0°=UTC, ±90°=±6h, ±180°=±12h, 1°=4min)
@ffflorian ffflorian merged commit 828c91b into main Mar 28, 2026
4 checks passed
@ffflorian ffflorian deleted the my-timezone/solar-time-clarification branch March 28, 2026 20:34
github-actions bot pushed a commit that referenced this pull request Mar 28, 2026
## my-timezone [1.15.2](https://github.com/ffflorian/node-packages/compare/my-timezone@1.15.1...my-timezone@1.15.2) (2026-03-28)

### Bug Fixes

* **my-timezone:** clarify solar time semantics and fix stale API names ([#1158](#1158)) ([828c91b](828c91b))
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