Changeset 17716 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2021-04-09T00:19:50+02:00 (4 years ago)
Author:
simon04
Message:

see #14176 - Migrate UserInfo to Instant

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/UserInfo.java

    r11878 r17716  
    22package org.openstreetmap.josm.data.osm;
    33
    4 import java.util.Date;
     4import java.time.Instant;
    55import java.util.List;
    66
    77import org.openstreetmap.josm.data.coor.LatLon;
    8 import org.openstreetmap.josm.tools.date.DateUtils;
    98
    109/**
     
    1817    private String displayName;
    1918    /** the date this user was created */
    20     private Date accountCreated;
     19    private Instant accountCreated;
    2120    /** the home location */
    2221    private LatLon home;
     
    7372     * @return the user account creation date
    7473     */
    75     public Date getAccountCreated() {
    76         return DateUtils.cloneDate(accountCreated);
     74    public Instant getAccountCreated() {
     75        return accountCreated;
    7776    }
    7877
     
    8180     * @param accountCreated user account creation date
    8281     */
    83     public void setAccountCreated(Date accountCreated) {
    84         this.accountCreated = DateUtils.cloneDate(accountCreated);
     82    public void setAccountCreated(Instant accountCreated) {
     83        this.accountCreated = accountCreated;
    8584    }
    8685
  • trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java

    r16436 r17716  
    6161            v = getAttribute(xmlNode, "account_created");
    6262            if (v != null) {
    63                 userInfo.setAccountCreated(DateUtils.fromString(v));
     63                userInfo.setAccountCreated(DateUtils.parseInstant(v));
    6464            }
    6565            // -- description
Note: See TracChangeset for help on using the changeset viewer.