All problems

Daily Report Applies Timezone Offset in Reverse

Level 2 · node · Correctness · Reversed UTC-to-local offset

Scenario

An operations report groups UTC events by local business date. Its conversion helper subtracts rather than adds the timezone offset, assigning near-midnight events to the wrong day.

Requirements

Add the signed minute offset to UTC before extracting the local date. Support positive, negative and zero offsets, including midnight boundaries.

Acceptance criteria

  • Positive offsets can move an event into the next day
  • Negative offsets can move an event into the previous day
  • Zero offset preserves the UTC date
  • Events away from midnight remain correctly dated