Changeset 1185 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2008-12-28T12:10:55+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
r1169 r1185 37 37 public final static SimpleDateFormat GPXTIMEFMT = 38 38 new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); // ignore timezone 39 public final static SimpleDateFormat GPXTIMEFMT2 = 40 new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); // ignore timezone 39 41 40 42 public void setTime() { … … 43 45 } 44 46 Date d = GPXTIMEFMT.parse(attr.get("time").toString(), new ParsePosition(0)); 47 if (d == null) { 48 d = GPXTIMEFMT2.parse(attr.get("time").toString(), new ParsePosition(0)); 49 } 45 50 if (d != null /* parsing ok */) { 46 51 time = d.getTime() / 1000.0; /* ms => seconds */
Note:
See TracChangeset
for help on using the changeset viewer.