Why does Java have support for time zone offsets with seconds precision?

Michal Kordas :

On Wikipedia time zone offsets are explained as the difference in hours and minutes from standard UTC time. However, DateTimeFormatter supports zone-offset pattern XXXXX, which "outputs the hour and minute and optional second, with a colon, such as '+01:30:15'."

Are offsets like +01:30:15 ISO valid? If not, based on which standard does Java define such offsets?

Jon Skeet :

It's not supported by ISO-8601, but it is a valid offset as recorded in the IANA time zone database.

Sub-minute offsets are common in the data for the late 19th and early 20th century, before time zones were properly standardized. For example, Europe/Paris had an offset of +00:09:21 until 1911 (according to the IANA database).

The latest occurrence I can find for this is Africa/Monrovia which had a sub-minute offset until 1972!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=35023&siteId=1