[threeten-develop] Short time zone offsets do not parse. Bug or feature?
Status: Alpha
Brought to you by:
scolebourne
From: Basil B. <bas...@po...> - 2014-01-18 01:29:37
|
I have discovered that the ZonedDateTime.parse method fails with short time zone offsets. This string can be parsed: 2014-01-17T16:45:30.528-01:00 but this cannot: 2014-01-17T16:45:30.528-01 See details here: https://github.com/ThreeTen/threeten/issues/345 I am posting here because of today’s email asking to "Please review the Final Release Specification (zip)[1] and materials.”. In looking at the documentation for: ZonedDateTime.parse …/datetime-1_0-fr-spec/java/time/ZonedDateTime.html#parse-java.lang.CharSequence- and DateTimeFormatter.ISO_ZONED_DATE_TIME …/datetime-1_0-fr-spec/java/time/format/DateTimeFormatter.html#ISO_ZONED_DATE_TIME …I find they do not clearly make a promise as to how fully they will handle all variations of valid ISO 8601 strings. In an effort to make clear their handling of non-Standard time zone names such as “[Europe/Paris]” including the phrase “ISO-like”, the issue of strict compliance with ISO 8601 is muddled. The reader has a difficult time determining exactly what kind of ISO 8601 strings are handled by JSR 310 parsing. The above is a long-winded way of saying: The doc fails to make clear whether the failure to parse short time zone offsets is a bug or a feature. —Basil Bourque |