A little late to the party, but...
It looks vaguely like ISO 8601
This doesn't just look vaguely like ISO 8601, it
is ISO 8601, which specifies two formats -- a basic format (as above), and an extended format that uses separators for readability. The basic format only requires separators when necessary to remove ambiguity. For example, YYYY-MM requires the hyphen, even in the basic format.
, but when I
tell C# to use ISO 8601 with the "o" format, I get something that looks different:
ISO 8601:
2015-10-20T13:40:59.4105922-07:00
I'm temporarily going to work around it by just specifying it directly with MM DD YY etc in the right place. But I'll be worried that's wrong, and that I'm missing something.
You won't be missing anything. If you read the
docs for the "o" format, it says
The "O" or "o" standard format specifier corresponds to the "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK" custom format string for DateTime values and to the "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffzzz" custom format string for DateTimeOffset values. In this string, the pairs of single quotation marks that delimit individual characters, such as the hyphens, the colons, and the letter "T", indicate that the individual character is a literal that cannot be changed.
You can use a custom format string that removes the separators and fractional seconds (you'll probably still want the TZ info, though), and still be ISO 8601 compliant.