I need the format string for a date that is formatted like this: 2017-06-14T00:00:00Z
.
Currently, I have:
DateTimeFormatter DT_SCHEDULE_FORMATTER_START_TIME = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ssZ");
If I parse a the string 2017-06-14T00:00:00Z
with this, it gives me the right time in UTC.
But when I take a DateTime
object and try to do:
String strNow = new DateTime().toString(DT_SCHEDULE_FORMATTER_START_TIME);
I get something like 2017-06-14T00:00:00 -07:00
I've looked in the documentation and can't seem to find the right formatting string.