Why does Joda time change the PM in my input string to AM?
Posted
by
Tree
on Stack Overflow
See other posts from Stack Overflow
or by Tree
Published on 2011-01-13T18:48:33Z
Indexed on
2011/01/13
18:54 UTC
Read the original article
Hit count: 282
My input string is a PM time:
log(start);
// Sunday, January 09, 2011 6:30:00 PM
I'm using Joda Time's pattern syntax as follows to parse the DateTime:
DateTimeFormatter parser1 =
DateTimeFormat.forPattern("EEEE, MMMM dd, yyyy H:mm:ss aa");
DateTime startTime = parser1.parseDateTime(start);
So, why is my output string AM?
log(parser1.print(startTime));
// Sunday, January 09, 2011 6:30:00 AM
© Stack Overflow or respective owner