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...
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.
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).
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).
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.
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.
That looks like RFC 3339.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With