Home > Net >  How to get around unparseable date in Jenkins?
How to get around unparseable date in Jenkins?

Time:10-16

I am trying to parse the following date in Jenkins 2021-10-14T18:12:20.578 00:00 however, I am getting the error Unparseable date: "2020-01-01T10:10:20.578 00:00"

This is my code, not sure what I am doing wrong:

Date myDate= new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").parse("2020-01-01T10:10:20.578 00:00");

CodePudding user response:

Missing GMT there

Date myDate= new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").parse("2020-01-01T10:10:20.578GMT 00:00");
  • Related