I have the following time / date string
2016-08-01T20:46:03.8114163+01:00
I am trying to change into a timestamp
When I apply the following JAVA code I get
1451685677163
Removing the 163 off the end this gives a wrong time of
GMT: Fri, 01 Jan 2016 22:01:17 GMT
Here is my code
DateFormat dF = new SimpleDateFormat("yyyy-mm-dd'T'HH:mm:ss.SSSSSSSX");
try {
Date date = dF.parse(ts);
System.out.println(date.getTime());
} catch (ParseException a) {
a.printStackTrace();
}
My problem must be the SimpleDateFormat but cannot understand what the configuration should be. Any help appreciated. Thanks