List of usage examples for android.util TimeFormatException printStackTrace
public void printStackTrace()
From source file:com.snaptic.api.SnapticAPI.java
private long parse3339(String time) { if (time == null || time.length() == 0) { return 0; }/* www . j a v a2 s. c om*/ if (timestamper != null) { try { timestamper.parse3339(time); } catch (TimeFormatException e) { log("caught a TimeFormatException parsing timestamp: \"" + time + '"'); e.printStackTrace(); return 0; } return timestamper.normalize(false); } else { Date timestamp = new Date(); SimpleDateFormat rfc3339 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); rfc3339.setLenient(true); try { timestamp = rfc3339.parse(time); } catch (ParseException e) { log("caught a ParseException parsing timestamp: \"" + time + '"'); e.printStackTrace(); return 0; } return timestamp.getTime(); } }