B
bill tie
How is midnight represented in ISO 8601 format?
Thank you.
Thank you.
How is midnight represented in ISO 8601 format?
Jani said:Hello,
How is midnight represented in ISO 8601 format?
Although this isn't a purely C# question, here goes. In the ISO 8601 format,
midnight can be done in two ways, either as "00:00:00" or "24:00:00". From
the specification:
-------------------------------
4.2.3 Midnight
The complete representations in basic and extended format for midnight, in
accordance with 4.2.2, shall be
expressed in either of the two following ways:
Basic format Extended format
a) 000000 00:00:00 (the beginning of a calendar day)
b) 240000 24:00:00 (the end of a calendar day)
...
NOTE 2: The end of one calendar day [24:00] coincides with [00:00] at the
start of the next calendar day, e.g. [24:00] on 12 April 1985 is the same as
[00:00] on 13 April 1985. If there is no association with a date or a time
interval both a) and b) represent the same local time in the 24-hour
timekeeping system.
-------------------------------
A fellow countryman has a summary page about the format, including a direct
link to the ISO 8601 specification in PDF format:
http://www.cs.tut.fi/~jkorpela/iso8601.html