- Timestamp:
- 2008-02-29T20:34:11+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
r553 r571 33 33 */ 34 34 public void setTime () { 35 if (! attr.containsKey("time")) 35 if (! attr.containsKey("time")) { 36 36 time = 0.0; 37 return; 38 } 37 39 SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); // ignore timezone 38 40 Date d = f.parse(attr.get("time").toString(), new ParsePosition(0)); 39 if (d == null /* failed to parse */) 41 if (d == null /* failed to parse */) { 40 42 time = 0.0; 41 time = d.getTime() / 1000.0; /* ms => seconds */ 43 } else { 44 time = d.getTime() / 1000.0; /* ms => seconds */ 45 } 42 46 } 43 47
Note:
See TracChangeset
for help on using the changeset viewer.