Hello there, when parsing

DateTimeFormatter fmt = DateTimeFormat.forPattern( "E MM dd HH:mm:ss Z yyyy" );
DateTime dt = fmt.withLocale( Locale.US ).parseDateTime( "Friday 09 24 11:22:33 
+02:00 2011" );
Date actual = dt.toDate();

I get back Fri Sep 23 11:22:33 CEST 2011
I might have expected Sat Sep 24 11:22:33 CEST 2011

The point is that actually September 23 is the Friday and September 24 the 
Saturday. Shouldn’t
parseDateTime have thrown an IllegalArgumentException or some such?


n  Sebastian

IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Kamyar Niroumand, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - 
Registergericht/Commercial register: Saarbrücken HRB 19681
http://www.softwareag.com

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to