All problems

Shipment Event Ordering Breaks Across Timezone Offsets

Level 2 · node · Data · Timestamp string ordering error

Scenario

A shipment tracking service displays the latest status from ISO 8601 events received from multiple hubs. Events sharing an offset work, but when timezone offsets differ an older event can be selected as latest.

Requirements

- Compare events by their actual ISO 8601 instant - Handle different timezone offsets correctly - Return the status of the latest event - Return null when there are no events - Do not mutate the original event array

Acceptance criteria

  • Select the latest event when timezone is the same
  • Select the actual latest event across different offsets
  • Handle UTC with a negative offset
  • An empty list returns null
  • Input order is not mutated