Hi!

I am sure this has been asked a million time but I searched the
mailing list and found nothing.

Is it possible to parse timezone using DateTimeFormatter? I tried:
String s = "10:22 EST";
DateTimeFormatter fmt = DateTimeFormat.forPattern("hh:mm
zzz").withLocale(Locale.ENGLISH);
fmt.parseDateTime(s);

But I get: Invalid format: "10:22 EST" is malformed at "EST"

I looked at the javadoc (hey, I did my homework!) and found that "z"
means "time zone                    text          Pacific Standard
Time; PST"
BUT, below it says "Zone names: Time zone names ('z') cannot be parsed."

Does this mean that timezones cannot be parsed and only be formatted for output?

If so, is there any plan to add the timezone parsing to joda-time?
I checked the feature request and bugzilla and found nothing.
Looks like this is huge compatibility issue between
java.text.SimpleDateFormat and DateTimeFormatter.

Thank you very much!

BTW, joda-time is great, it make working with date and time so easier!

Manuel Darveau

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to