Validation error: all time values must include a timezone offset when mixing UTC and zone‑naive timestamps
0 reputation · 07 Mar 2020, 19:31 UTC
0 reputation · 07 Mar 2020, 19:31 UTC
Goal: Ensure that a Datadog query can combine timestamps expressed as epoch milliseconds (without an explicit zone) and ISO‑8601 strings that include a UTC offset without triggering a validation failure.
Constraints: Datadog’s query editor rejects any request where some timestamps lack a timezone offset, returning the error “all time values must include a timezone offset”. The platform stores all timestamps in UTC, but the conversion logic for epoch‑millisecond values that arrive without a zone is not fully documented, leading to uncertainty about whether such values are interpreted as UTC or as the organization’s default timezone during aggregation.
Uncertainty: It is unclear how Datadog should treat ambiguous zone inputs when aggregating data for visualizations, monitors, or scheduled reports, and whether a default organization timezone is applied to epoch values in those contexts.
Specific questions:
Epoch‑millisecond timestamps that lack an explicit zone are treated as UTC milliseconds since the Unix epoch. Datadog does **not** apply the organization’s default timezone to those values; they remain UTC regardless of org settings. The validation error occurs because the query editor requires every time value to carry an offset.
# Instead of: from 1700000000000 to 1700086400000
# Use:
from "1700000000000Z" to "1700086400000Z"
from date(1700000000000) to date(1700086400000)
If you are using the Datadog API directly rather than the UI query editor, confirm whether the same offset requirement applies by checking the API documentation for your specific Datadog version, as enforcement can differ between UI and API endpoints.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.