Changeset 35825 in osm for applications/editors/josm/plugins/pbf/src/org
- Timestamp:
- 2021-10-03T00:20:47+02:00 (3 years ago)
- 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 103 103 if (info.hasTimestamp()) { 104 104 checkTimestamp(info.getTimestamp()); 105 osm.set Timestamp(getDate(info));105 osm.setInstant(getDate(info).toInstant()); 106 106 } 107 107 } … … 173 173 timestamp += info.getTimestamp(i); 174 174 checkTimestamp(timestamp); 175 nd.set Timestamp(new Date(date_granularity * timestamp));175 nd.setInstant(new Date(date_granularity * timestamp).toInstant()); 176 176 } 177 177 } … … 365 365 } 366 366 367 @SuppressWarnings("resource") 367 368 public void parse(InputStream source) throws IOException, IllegalDataException { 368 369 new BlockInputStream(source, parser).process(); -
applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfWriter.java
r35636 r35825 21 21 import org.openstreetmap.josm.data.osm.Way; 22 22 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 23 import org.openstreetmap.josm.tools.Logging; 23 24 24 25 import crosby.binary.BinarySerializer; … … 126 127 int uid = e.getUser() == null ? -1 : (int) e.getUser().getId(); 127 128 int userSid = stable.getIndex(getUserId(e)); 128 int timestamp = (int) (e.get Timestamp().getTime() / date_granularity);129 int timestamp = (int) (e.getInstant().toEpochMilli() / date_granularity); 129 130 int version = e.getVersion(); 130 131 long changeset = e.getChangesetId(); … … 150 151 b.setUserSid(stable.getIndex(e.getUser().getName())); 151 152 } 152 b.setTimestamp((int) (e.get Timestamp().getTime() / date_granularity));153 b.setTimestamp((int) (e.getInstant().toEpochMilli() / date_granularity)); 153 154 b.setVersion(e.getVersion()); 154 155 b.setChangeset(e.getChangesetId()); … … 435 436 } else { 436 437 // No data. Is this an empty file? 438 Logging.debug("No PBF data. Is this an empty file?"); 437 439 } 438 440 }
Note:
See TracChangeset
for help on using the changeset viewer.