Ignore:
Timestamp:
2021-10-03T00:20:47+02:00 (3 years ago)
Author:
Don-vip
Message:

update to JOSM 17749 / osmpbf 1.5.0

Location:
applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfReader.java

    r35636 r35825  
    103103            if (info.hasTimestamp()) {
    104104                checkTimestamp(info.getTimestamp());
    105                 osm.setTimestamp(getDate(info));
     105                osm.setInstant(getDate(info).toInstant());
    106106            }
    107107        }
     
    173173                                timestamp += info.getTimestamp(i);
    174174                                checkTimestamp(timestamp);
    175                                 nd.setTimestamp(new Date(date_granularity * timestamp));
     175                                nd.setInstant(new Date(date_granularity * timestamp).toInstant());
    176176                            }
    177177                        }
     
    365365    }
    366366
     367    @SuppressWarnings("resource")
    367368    public void parse(InputStream source) throws IOException, IllegalDataException {
    368369        new BlockInputStream(source, parser).process();
  • applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfWriter.java

    r35636 r35825  
    2121import org.openstreetmap.josm.data.osm.Way;
    2222import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     23import org.openstreetmap.josm.tools.Logging;
    2324
    2425import crosby.binary.BinarySerializer;
     
    126127                    int uid = e.getUser() == null ? -1 : (int) e.getUser().getId();
    127128                    int userSid = stable.getIndex(getUserId(e));
    128                     int timestamp = (int) (e.getTimestamp().getTime() / date_granularity);
     129                    int timestamp = (int) (e.getInstant().toEpochMilli() / date_granularity);
    129130                    int version = e.getVersion();
    130131                    long changeset = e.getChangesetId();
     
    150151                        b.setUserSid(stable.getIndex(e.getUser().getName()));
    151152                    }
    152                     b.setTimestamp((int) (e.getTimestamp().getTime() / date_granularity));
     153                    b.setTimestamp((int) (e.getInstant().toEpochMilli() / date_granularity));
    153154                    b.setVersion(e.getVersion());
    154155                    b.setChangeset(e.getChangesetId());
     
    435436            } else {
    436437                // No data. Is this an empty file?
     438                Logging.debug("No PBF data. Is this an empty file?");
    437439            }
    438440        }
Note: See TracChangeset for help on using the changeset viewer.