How to handle times
All times MUST use the FHIR primitive type defined for the element. For example,
instant(YYYY-MM-DDThh:mm:ss.sssssss+zz:zz) formeta.lastUpdated, anddateTime(YYYY-MM-DDThh:mm:ss[.fraction][timezone]) forAppointment.start,Appointment.end, andAppointment.created).- e.g.
Year-Month-DayTHours:Minutes:Seconds.milliseconds+OffsetFromUTC - e.g.
2015-02-07T13:28:17.2398742+02:00 - except where specifically defined otherwise
- e.g.
All times can have up to seven digits resolution for milliseconds
All times SHOULD be converted to UTC from local times (if not stored locally in UTC) before being included in any messages, this means the offset should be zero
When receiving a time in a message a system MUST expect and handle a non UTC time (e.g. with a non-zero offset)
- Therefore if a time is received that is not UTC, the receiver should convert the time back to UTC using the offset given (or to their local time, if storing times in a local time)
Important:
This means both Sender and Receiver systems MUST be able to handle a time provided with an offset from UTC that differs from your local server time. As an illustration, if you store all times in UTC and someone uses a time specifying an offset, you will need to convert it to UTC when you store it.