We're updating the issue view to help you get more done. 

18:00 PM parsed incorrectly

Description

Consider the following code snippet:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 #include <iostream> #include "unicode/smpdtfmt.h" int main() { UErrorCode error = U_ZERO_ERROR; SimpleDateFormat sdf = SimpleDateFormat(UnicodeString(), Locale("en"), error); sdf.applyPattern(UnicodeString("yyyy-MM-dd hh:mm a")); printf("%lf\n", sdf.parse(UnicodeString("2015-11-13 06:00 PM"), error)); printf("%lf\n", sdf.parse(UnicodeString("2015-11-13 18:00 PM"), error)); return 0; }

The two `printf`s print two different UDates exactly 12 hours apart, suggesting that 18:00 PM is not normalized to 6:00 PM before `parse()` returns.

Is this intended behavior?

Environment

Status

Assignee

kazede@google.com

Reporter

kazede@google.com

Time Needed

Hours

tracCc

scott_russell

tracCreated

Feb 11, 2016, 11:07 PM

tracOwner

kazede

tracProject

all

tracReporter

kazede

tracStatus

design

tracWeeks

0.2

Components

Fix versions

Priority

assess