Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what do you call a date/time with a T in the middle (2008-09-18T00:00:00)?

Tags:

datetime

If you have a date like '2008-09-18T00:00:00' does it have a name? UTC? Something like that? Surprisingly hard to google for this...

like image 433
jcollum Avatar asked Jan 04 '10 22:01

jcollum


People also ask

What is the T in date format?

The T is just a literal to separate the date from the time, and the Z means "zero hour offset" also known as "Zulu time" (UTC). If your strings always have a "Z" you can use: SimpleDateFormat format = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss. SSS'Z'", Locale.US); format.

What does T stand for in date-time?

The T doesn't really stand for anything. It is just the separator that the ISO 8601 combined date-time format requires. You can read it as an abbreviation for Time. The Z stands for the Zero timezone, as it is offset by 0 from the Coordinated Universal Time (UTC).

How do I read the ISO 8601 date format?

ISO 8601 represents date and time by starting with the year, followed by the month, the day, the hour, the minutes, seconds and milliseconds. For example, 2020-07-10 15:00:00.000, represents the 10th of July 2020 at 3 p.m. (in local time as there is no time zone offset specified—more on that below).

What is Z in date-time format?

Local date and time values is an offset from UTC (for example, +01:00, -07:00). All DateTimeOffset values are also represented in this format. The time zone component of DateTimeKind. Utc date and time values uses "Z" (which stands for zero offset) to represent UTC.


2 Answers

That is a combined date/time representation as defined by ISO8601. It often has a timezone/offset appended to it, e.g. 2008-09-18T00:00:00Z would denote UTC time.

like image 175
Michael Haren Avatar answered Dec 02 '22 17:12

Michael Haren


That looks like RFC 3339.

like image 41
Aaron Brethorst Avatar answered Dec 02 '22 16:12

Aaron Brethorst