Search code examples
timetimestamputcrfc3339

How to interpret RFC3339 UTC timestamp


How should I interpret all aspects of the following timestamps? Where is the time based and how do timezones apply?

2015-11-15T14:45:28Z
2015-11-15T14:45:28.9694Z
2015-11-15T14:45:28.969412345Z 

Below is my thoughts...

Date:    2015-11-15
???:     T
Hours:   14
Minutes: 45
Seconds: 28 OR 28.9694 OR 28.969412345
???:     Z

Solution

  • Most of your values are attributed correctly. The date portion (2015-11-15) is in the order YYYY-MM-DD, time in HH:MM:SS.ffff.

    T indicates the start of the time portion of the date time.

    Z indicates the time zone is UTC. Next to Z, you could have a format like Z+02:00, which indicates the time zone is UTC + 2 hours.