Webhook Time Parsing Guidelines
This guide complements:
webhook-time-fields-map.csvwebhook-time-fields-strategy.csv
Scope: webhook-20260601004833.json (account display context UTC-6).
Core Rule
There are two distinct time semantics in the payload:
UTCinstants (event/audit moments)LocalBusinessdate/times (schedule/service-day semantics)
Do not treat them the same.
UTC Fields (Event/Audit Time)
Typical examples:
created(epoch)*.createdAt.value*.updatedAt.valuedepartureTimestamparrivalTimestamp
Backend Do
- Parse as UTC immediately.
- Persist in UTC (
ISO8601 Zor epoch). - Convert only at presentation boundaries.
Backend Don't
- Don't reinterpret these using station/account timezone before storage.
- Don't drop timezone information.
Data Team Do
- Use these for event ordering, latency, SLA, and auditing.
- Join cross-system events on these fields.
Data Team Don't
- Don't use these alone as "service day" business keys.
LocalBusiness Fields (Schedule/Service Context)
Typical examples:
travelDate.valuedepartureDatetime.valuearrivalDate.valuemanifestDate.valueexpirationDate.valueproductExpirationDate.valuecutOffDateTime.valuedatedepartureTime
Backend Do
- Treat as business-local datetime/date values.
- Carry timezone context (
shiftLocation.timeZone, station timezone, or account timezone) with these fields. - Use these for schedule logic, ticket validity windows, and operational day rules.
Backend Don't
- Don't blindly convert these as UTC instants just because a
Zis present. - Don't compare these directly with audit UTC instants without normalization intent.
Data Team Do
- Build service-day dimensions from LocalBusiness fields + timezone context.
- Use explicit transformations when creating UTC analytics fields.
Data Team Don't
- Don't mix LocalBusiness and UTC fields in the same metric without defining business intent.
Quick Identification Heuristics
- If field is
created,createdAt,updatedAt, or ends withTimestamp-> likelyUTC. - If field is
date,departureTime,manifestDate,travelDate,cutOffDateTime-> likelyLocalBusiness. - Always prefer semantic field intent over string format.
Recommended Storage Pattern
- Keep original payload fields as received (raw zone semantics preserved).
- Add derived normalized columns:
*_utcfor UTC-usable timestamps*_localfor business-local values*_timezonefor context
Example:
departureTimestamp->departure_timestamp_utctravelDate.value+shiftLocation.timeZone->travel_datetime_local,travel_timezone
Validation Checks to Add
- Assert
departureTimestampaligns with localdepartureTimeafter timezone conversion. - Flag records where service-day fields and UTC instants diverge beyond expected offset logic.
- Log timezone source used for each normalization step.