Strictly speaking, this title may not be correct, because I first niang a bit, ISO8601 time format standard should resemble: 2016-01-18t23:41:00-08:00, and UTC time format is almost similar
In doing a project using a foreign API, the return time format is:2016-01-18t23:41:00
I have a few questions to ask:
1. Because there is no specific data to search, the 2016-01-18t23:41:00 returned is the UTC time and the ISO-8601 time format?
2. As above, if this is the ISO time format, because there is no time zone specified, then the default is +00:00 like "2016-01-18t23:41:00"? (if it is a UTC time, it is similar to the problem, no time zone/slack is specified what the default is, if any)
Reply content:
Strictly speaking, this title may not be correct, because I first niang a bit, ISO8601 time format standard should resemble: 2016-01-18t23:41:00-08:00, and UTC time format is almost similar
In doing a project using a foreign API, the return time format is:2016-01-18t23:41:00
I have a few questions to ask:
1. Because there is no specific data to search, the 2016-01-18t23:41:00 returned is the UTC time and the ISO-8601 time format?
2. As above, if this is the ISO time format, because there is no time zone specified, then the default is +00:00 like "2016-01-18t23:41:00"? (if it is a UTC time, it is similar to the problem, no time zone/slack is specified what the default is, if any)
UTC is the time standard; ISO-8601 is a standard format for representing time, and most programming languages support it.
2016-01-18t23:41:00 is a time representation that complies with the ISO-8601 standard.
The T in the 2016-01-18t23:41:00 represents UTC, so this string resolves to the UTC time of 2016-01-18 23:41:00, then converted to Beijing local time display (for example, in JavaScript, the new date (' 201 6-01-18t23:41:00 ') (toLocaleString ()) is added with a 8-hour offset, which becomes: 2016-01-19 7:41:00.
More of this stuff, you can refer to the article I wrote earlier: http://segmentfault.com/a/1190000004292140
First you are confused about these two concepts, UTC is time, not the format of time, and ISO-8601 cannot be compared.
Then answer your question,
IOS-8601 does not have a single format, but contains many formats, where there is no time zone for the 0 time zone. Of course, there is no time in other formats but only dates.
Attach a copy of the IOS-8601 official code
Http://www.iso.org/iso/home/standards/iso8601.htm
Wikipedia:
Time zones in ISO 8601 is represented as local time (with the location unspecified), as UTC, or as a offset from UTC.
If No UTC relation information is given with a time representation, the time was assumed to being in local time.
Therefore, if you do not specify a time zone, the local time is indicated. Equivalent to the time LocalTime received. The time zone does not specify a UTC time, and the UTC time must last indicate Z or an offset of +00.
The meaning of the T is only the delimiter, no other meaning.