Strictly speaking, this title may not be correct, because I first tried it. The ISO8601 time format standard should be similar to: 2016-01-18T23: 41: 00-08:00, the UTC time format is similar to using a foreign API for a project. The returned time format is: 2016-0... strictly speaking, this title may not be correct, because I first tried it. The ISO8601 time format standard should be similar to: 2016-01-18T23: 41: 00-08:00, while the UTC time format is similar.
When a project uses a foreign API, the returned time format is:2016-01-18T23: 41: 00
I have a few questions to ask:
1. Because no specific information is found, the returned 2016-01-18T23: 41: 00 is UTC time and is ISO-8601 time format?
2. As shown above, if this is an ISO time format, because no time zone is specified, will it be + by default, like "2016-01-18T23: 41: 00? (If it is UTC time, it is also a similar problem. The default time zone/time difference is not specified, if any)
Reply content:
Strictly speaking, this title may not be correct, because I first tried it. The ISO8601 time format standard should be similar to: 2016-01-18T23: 41: 00-08:00, while the UTC time format is similar.
When a project uses a foreign API, the returned time format is:2016-01-18T23: 41: 00
I have a few questions to ask:
1. Because no specific information is found, the returned 2016-01-18T23: 41: 00 is UTC time and is ISO-8601 time format?
2. As shown above, if this is an ISO time format, because no time zone is specified, will it be + by default, like "2016-01-18T23: 41: 00? (If it is UTC time, it is also a similar problem. The default time zone/time difference is not specified, if any)
UTC is the time standard; ISO-8601 is a standard format that represents time, which is supported by most programming languages.
2016-01-18T23: 41: 00 is a time representation that complies with ISO-8601 standards.
T in 2016-01-18T23: 41: 00 represents UTC, so the string is parsed to indicate 23:41:00 of UTC time, then converted to Beijing Local Time Display (for example, in JavaScript, new Date ('2017-01-18T23: 41: 00 '). when toLocaleString () is added, the 8-hour offset is changed to 7:41:00.
For more information on this, refer to my previous article: http://segmentfault.com/a/1190000004292140
First you are confused about the two concepts, UTC is time, not the time format, and cannot be compared with the ISO-8601.
Answer your question later,
The IOS-8601 contains a lot of formats, and there is no time zone of 0. Of course, other formats do not have time only for date.
Appendix A IOS-8601 official Specification
Http://www.iso.org/iso/home/standards/iso8601.htm
Wikipedia:
Time zones in ISO 8601 are represented as local time (with the location unspecified), as UTC, or as an offset from UTC.
If no UTC relation information is given with a time representation, the time is assumed to be in local time.
Therefore, if no time zone is specified, local time is used. It is equivalent to the time obtained by localtime. If the time zone is not specified, it does not represent UTC time. The UTC time must end with the offset Z or + 00.
The meaning of T is only a separator, which has no other meaning.