Skip to content

Commit

Permalink
Timestamp format has changed in 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
philippecade committed Apr 12, 2019
1 parent c471d54 commit 350233f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ private String[] split(String line) {

private Date parseTimestamp(String timestamp) {
try {
// Example: Fri May 18 2018 09:28:53 GMT+0200 (W. Europe Daylight Time)
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM d yyyy HH:mm:ss");
// Example: 2019-04-12T13:52:20.186Z
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX");
// Note: skips time time zone
return dateFormat.parse(timestamp);
} catch (ParseException e) {
Expand Down

0 comments on commit 350233f

Please sign in to comment.