Skip to content

test: restore the timezone-offset case for epochSecondsOf - #209

Merged
thomasfosterau merged 1 commit into
trunkfrom
claude/epoch-seconds-offset-test
Oct 22, 2026
Merged

thomasfosterau merged 1 commit into
trunkfrom
claude/epoch-seconds-offset-test

Conversation

@thomasfosterau

Copy link
Copy Markdown
Owner

Summary

Restores the timezone-offset case that PR #204 dropped when it folded the old toEpochSeconds suite into epochSecondsOf's tests (packages/payments/tests/internal.test.ts, the core's ./internal):

expect(epochSecondsOf("2026-01-01T10:00:00.900+10:00")).toBe(1_767_225_600);

10:00:00.900 at +10:00 is 2026-01-01T00:00:00.900Z. epochSecondsOf parses with DateTime.make and takes Math.floor(toEpochMillis / 1000), so the fraction is dropped and the result is 1_767_225_600. The implementation already returns this value, so it is unchanged.

Verification

  • vp check: pass (0 errors; the warnings were already there)
  • vp run check: pass (13/13 tasks)
  • vp run -r test:unit: pass (all 5 packages; payments 1368/1368 tests)
  • vp run -r build: pass
  • vp run docgen: pass (17/17 tasks)
  • vp run test:coverage: pass, then fallow audit --base origin/trunk: pass ("No issues in 1 changed file")

Changeset

  • None needed: this changes a test only.

Notes

The change is one added assertion and touches no source.


Generated by Claude Code

PR #204 folded the toEpochSeconds suite into epochSecondsOf's tests and
dropped the offset case. 2026-01-01T10:00:00.900+10:00 is
2026-01-01T00:00:00.900Z, which rounds down to 1_767_225_600.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WC1gJZL1bzFPvz66HKMe6H
@thomasfosterau
thomasfosterau merged commit e4ed006 into trunk Oct 22, 2026
1 check passed
@thomasfosterau
thomasfosterau deleted the claude/epoch-seconds-offset-test branch October 22, 2026 09:29
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.

2 participants