Changeset 17748 in josm for trunk/src/org


Ignore:
Timestamp:
2021-04-11T21:56:47+02:00 (3 years ago)
Author:
simon04
Message:

see #14176 - Migrate GPX to Instant

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

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

    r17715 r17748  
    296296            Instant at = a.getInstant();
    297297            Instant bt = b.getInstant();
    298             inv = bt.isBefore(at);
     298            inv = at != null && bt != null && bt.isBefore(at);
    299299            if (inv) {
    300300                firstWp = b;
  • trunk/src/org/openstreetmap/josm/io/GpxReader.java

    r17166 r17748  
    477477                case PT_TIME:
    478478                    try {
    479                         currentWayPoint.setTimeInMillis(DateUtils.tsFromString(accumulator.toString()));
     479                        currentWayPoint.setInstant(DateUtils.parseInstant(accumulator.toString()));
    480480                    } catch (UncheckedParseException | DateTimeException e) {
    481481                        Logging.error(e);
Note: See TracChangeset for help on using the changeset viewer.