List of usage examples for com.google.gson.internal.bind.util ISO8601Utils parse
public static Date parse(String date, ParsePosition pos) throws ParseException
From source file:org.cgiar.ccafs.marlo.utils.DateTypeAdapter.java
License:Open Source License
private synchronized Date deserializeToDate(String json) { try {// w w w.j ava 2s . c o m return localFormat.parse(json); } catch (ParseException ignored) { } try { return enUsFormat.parse(json); } catch (ParseException ignored) { } try { return ISO8601Utils.parse(json, new ParsePosition(0)); } catch (ParseException e) { return new Date(); } }