Ticket #11650: dates.patch

File dates.patch, 1.5 KB (added by shinigami, 7 years ago)

patch

  • src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    ### Eclipse Workspace Patch 1.0
    #P JOSM
     
    12271227    public void load(PrimitiveData data) {
    12281228        // Write lock is provided by subclasses
    12291229        setKeys(data.getKeys());
    1230         setTimestamp(data.getTimestamp());
     1230        setRawTimestamp(data.getRawTimestamp());
    12311231        user = data.getUser();
    12321232        setChangesetId(data.getChangesetId());
    12331233        setDeleted(data.isDeleted());
  • src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

     
    291291        this.timestamp = (int) (timestamp.getTime() / 1000);
    292292    }
    293293
     294    protected void setRawTimestamp(int timestamp) {
     295        this.timestamp = timestamp;
     296    }
     297
    294298    /**
    295299     * Time of last modification to this object. This is not set by JOSM but
    296300     * read from the server and delivered back to the server unmodified. It is
     
    303307        return new Date(timestamp * 1000L);
    304308    }
    305309
     310    protected int getRawTimestamp() {
     311        return timestamp;
     312    }
     313
    306314    @Override
    307315    public boolean isTimestampEmpty() {
    308316        return timestamp == 0;