instant Must Include a Timezone
The FHIR instant type (used by meta.lastUpdated and similar) requires full precision to the second with a mandatory timezone offset, either Z or +/-HH:MM.
FHIR · Error
The error
is not a valid instant — must include timezoneWhy it happens
Dropping the timezone (2024-01-15T12:00:00 with no Z), using a date only, or omitting seconds. An instant is stricter than a dateTime: every component is required.
How to fix it
Provide YYYY-MM-DDThh:mm:ss with a timezone. Use Z for UTC or an explicit offset like +10:00. For example 2024-01-15T12:00:00Z.
Example
The snippet below triggers the error:
{
"resourceType": "Patient",
"meta": { "lastUpdated": "2024-01-15T12:00:00" }
}The corrected version:
{
"resourceType": "Patient",
"meta": { "lastUpdated": "2024-01-15T12:00:00Z" }
}Frequently asked questions
Why does instant require a timezone but date does not?
An instant pins down a precise moment in time, which is meaningless without a timezone. A date represents a calendar day, which is timezone-independent. That is why instant mandates Z or an offset.
Related
- Open the FHIR Validator
- All validation errors
- resourceType Is Required
- Unknown FHIR R4 Resource Type
- Required Element Is Missing for This Resource
- gender Must Be male, female, other, or unknown
- birthDate Must Be YYYY, YYYY-MM, or YYYY-MM-DD
- Resource id Has an Invalid Format
- subject Must Be a Reference Object, Not a String
- Reference Should Be Type/id, urn:uuid, or an Absolute URL