Hi all!
I'm using JodaTime 2.1 on Android (SDK 20, API 16) and stumbled upon a weird
error:
DateTimeZone.forID("+01:00")
returns a DateTimeZone with the internal ID "UTC", and not, as expected,
"+01:00".
I saw that this is (of course) tested and that this particular case seems to
properly work
on a Desktop Java integration platform, so I pretty much guess that it is an
Android
issue. For now I wrote some code to parse DateTimeZone ids myself, i.e.
String id = "+01:00";
DateTimeZone zone;
if (id.matches("(\\+|\\-)\\d{2}:\\d{2}")) {
String offsetParts[] = id.split(":");
zone = DateTimeZone.forOffsetHoursMinutes(
Integer.parseInt(offsetParts[0].replace("+", "")),
Integer.parseInt(offsetParts[1]));
} else {
Zone = DateTimeZone.forID(id);
}
and this works, but I'm not confident anymore if there aren't other subtle
errors in
the library unless I know where this problem really originates from.
Any idea how to debug this issue?
Thanks,
Thomas.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest