[threeten-dev] ZoneIdPrinterParser #262
roger riggs
roger.riggs at oracle.com
Sat Jun 8 10:34:25 PDT 2013
Hi,
Inissue #262 <https://github.com/ThreeTen/threeten/issues/262>, the
behavior of the DateTimeFormatterBuilder for ZoneIds
should be aligned with ZoneId.of as to which zoneid are accepted and
whether they create ZoneOffsets or ZoneIds.
Please review the changes and comment whether the test cases are correct.
There are a number of input values that were previously valid for parsing
of ZoneIds that are no longer valid (to match ZoneId). For example,
"UTC0" is no longer valid.
One inconvenience in the code after a prefix and the offset value is parsed
there is no public method to create the ZoneId. The ZoneId.of method as
to re-parse the input.
The method static ZoneRegion ofPrefixedOffset(String zoneId,
ZoneOffset offset)
is use for this purpose but it is package private and can't be used from
the format package.
Is it reasonable to add a method to ZoneId for a similar purpose?
http://cr.openjdk.java.net/~rriggs/webrev-zoneid-parser-262/
Thanks, Roger
More information about the threeten-dev
mailing list