I am trying to use Joda Time both for formatting DateTime objects to String and than parse these strings back to DateTime. But I am failing to so when the pattern includes z:
DateTimeFormatter dtf = DateTimeFormat.forPattern("dd-MM-yyyy HH:mm:ss.SSS z");
String dts = dtf.print(System.currentTimeMillis());
System.out.println(dts);
DateTime dt = dtf.parseDateTime(dts);
The above code is throwing exception when the parsing the String to DateTime takes occurred.
Do you have any idea?
Yosi