Ignore:
Timestamp:
2008-12-23T14:32:30+01:00 (11 years ago)
Author:
stoecker
Message:

added better NMEA reader. Closes bug #1448

File:
1 edited

Legend:

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

    r813 r1167  
    3535         * Convert the time stamp of the waypoint into seconds from the epoch
    3636         */
     37        public final static SimpleDateFormat GPXTIMEFMT =
     38                new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); // ignore timezone
     39       
    3740        public void setTime() {
    3841                if (! attr.containsKey("time")) {
    3942                        return;
    4043                }
    41                 SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); // ignore timezone
    42                 Date d = f.parse(attr.get("time").toString(), new ParsePosition(0));
     44                Date d = GPXTIMEFMT.parse(attr.get("time").toString(), new ParsePosition(0));
    4345                if (d != null /* parsing ok */) {
    4446                        time = d.getTime() / 1000.0; /* ms => seconds */
Note: See TracChangeset for help on using the changeset viewer.