0

I'm trying to work with the github api, but according to the test api endpoint I was given to try, all of the times are in zulu time, and I need to convert them to a local timezone, and after a brief scouring of the internet, I can't find any easy way to do so.

Github endpoint in question: https://api.github.com/repos/izuzak/pmrpc/commits?path=README.markdown

Example Timestamp: 2014-01-03T17:41:23Z

1 Answers1

0
String time = "2014-01-03T17:41:23Z";
DateTimeFormatter format = ISODateTimeFormat.basicDateTime();
DateTime jodaObj = format.parseDateTime(time);

If you use joda, the above should sort you.

hd1
  • 33,938
  • 5
  • 80
  • 91