0

I'm trying to parse some date strings which I receive in the following format using Joda Time

Sat, 08 Dec 2012 00:00:00 CST

Looking at the documentation, DateTimeFormat won't handle the parsing of this due to the time zone name been ambiguous. Given I have no control over the data strings I'm receiving, what is the best/simplest way to parse this into DateTime object?

Edit: I know this is Central Time Zone (North America) rather than one of the other possible time zones CST may refer too.

Kingamajick
  • 2,281
  • 1
  • 16
  • 19
  • [See this similar question](http://stackoverflow.com/questions/8635704/convert-to-cst-using-joda-api) which has been answered by the main contributor to joda time. So I think you have no choice but replace "CST" with the adequate long form time zone name. – assylias Dec 08 '12 at 18:11
  • 1
    Perfect, that does seem to be a very simple way to solve my problem. I just had to add support for the pattern "EEE, dd MMM yyyy HH:mm:ss ZZZ" as well as "EEE, dd MMM yyyy HH:mm:ss Z" (the rest of the dates I was using hat the time stamp format with +TTTT as the time zone) – Kingamajick Dec 08 '12 at 18:23

0 Answers0