0

2015-03-04T5:06:07.000+0000

I have access to date formats as above, and intend to compare and sort them in ascending order. This is OK when I use a simpler date format in the Playground, but the actual json data bemuses me as I cannot find out what 'T5' refers to, even after looking through the relevant Unicode page.

I had assumed it was a timezone reference, but this would be Z, and I don't think it would be after the day anyway.

Stamp
  • 933
  • 1
  • 9
  • 18

1 Answers1

3

"T" is just a separator between the date and time in ISO-8601. It means the strings following it is a Time.

The timezone part is "+0000" i.e. UTC.

So your date format just mean "2015 March 4th, 05:06:07am, at timezone UTC±0".

The letter "Z" means UTC (i.e. Zulu time) and only appears at the end of the string i.e. 2015-03-04T05:06:07.000Z

Community
  • 1
  • 1
kennytm
  • 491,404
  • 99
  • 1,053
  • 989