2

What are the letter T and Z inside a datetime ? I am trying to understand the format so I can properly convert this string to a datetime object in EST timezone using JavaScript

DateUtc: "2017-05-01T14:00:00Z"
Mark Kordahi
  • 67
  • 10
  • `javascript` != `java`. Which is it? – Andreas Apr 30 '17 at 01:33
  • 1
    See [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) on Wikipedia. [`T`](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) is a letter(!) separating the date part from the time part. [`Z`](https://en.wikipedia.org/wiki/ISO_8601#UTC) is a letter(!) indicating that the time zone is `UTC`. – Andreas Apr 30 '17 at 01:37
  • @Andreas—UTC isn't a timezone, it's a standard that uses offset +0000. ;-) – RobG Apr 30 '17 at 01:59
  • can you help on how to convert it to datetime object ? – Mark Kordahi Apr 30 '17 at 02:03
  • @RobG Saying that `Z` indicates that the time zone is `UTC`, is shorthand for saying that the time zone *of the date/time value given in the string* is *at offset zero from* `UTC`, i.e. is the same as time zone `UTC+00:00`, aka is the same as `UTC`. – Andreas Apr 30 '17 at 02:23

0 Answers0