VVVV (and V) fail to parse in timezone formats

Description

Deleted Component: formatting

I was writing up the code samples for how to handle parsing with VVVV, and was getting some strange results. Parsing of VVVV has gotten completely and utterly hosed (in ICU4J, maybe also in ICU4C).

The problem is in the code after:

http://bugs.icu-project.org/trac/browser/icu4j/trunk/src/com/ibm/icu/text/SimpleDateFormat.java#L1744

we have the line:

1744 switch (patternCharIndex)

It is supposed to switch based on the character. "V..." produces patternCharIndex == 29

But 29 is missing from the switch statement: all we have is:
1879 case 17: // 'z' - ZONE_OFFSET
1880 case 23: // 'Z' - TIMEZONE_RFC
1881 case 24: // 'v' - TIMEZONE_GENERIC

The addition of one extra line fixes the problem.

case 29: // 'V' - TIMEZONE_SPECIAL

I checked in a new test under trunk, in DateTimeGeneratorTest.java

Activity

Show:
TracBot
July 1, 2018, 12:13 AM
Trac Comment 5 by —2007-11-28T21:33:40.000Z

Some additional updates in #5990.

Fixed

Assignee

John Emmons

Reporter

Mark Davis

Components

None

Labels

None

Reviewer

None

Priority

major

Time Needed

None

Fix versions