Changeset 1185 in josm for trunk/src


Ignore:
Timestamp:
2008-12-28T12:10:55+01:00 (15 years ago)
Author:
stoecker
Message:

close bug #1896. Patch by Teemu Koskinen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java

    r1169 r1185  
    3737    public final static SimpleDateFormat GPXTIMEFMT =
    3838        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
    3941
    4042    public void setTime() {
     
    4345        }
    4446        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        }
    4550        if (d != null /* parsing ok */) {
    4651            time = d.getTime() / 1000.0; /* ms => seconds */
Note: See TracChangeset for help on using the changeset viewer.