diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-14 22:24:17 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-14 22:24:17 +1300 |
commit | e85f2a54420aa1299ea70b0bcf4a0c870620a31a (patch) | |
tree | 6a0ce5ded2fd24e5cf98f5e5f04095a03593105d /src/org/traccar/model/User.java | |
parent | b3e2f211c3a3c64c8fa704ba1942970bb97f8eae (diff) | |
parent | 1b499620810fe6d376a4a72c5ab66b6be2f4af5c (diff) | |
download | trackermap-server-e85f2a54420aa1299ea70b0bcf4a0c870620a31a.tar.gz trackermap-server-e85f2a54420aa1299ea70b0bcf4a0c870620a31a.tar.bz2 trackermap-server-e85f2a54420aa1299ea70b0bcf4a0c870620a31a.zip |
Merge pull request #3001 from Abyss777/timezone
Timezone field to User and Server model
Diffstat (limited to 'src/org/traccar/model/User.java')
-rw-r--r-- | src/org/traccar/model/User.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java index 274f2b2a2..366ced503 100644 --- a/src/org/traccar/model/User.java +++ b/src/org/traccar/model/User.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import org.traccar.helper.Hashing; import java.util.Date; +import java.util.TimeZone; public class User extends Extensible { @@ -265,4 +266,13 @@ public class User extends Extensible { return Hashing.validatePassword(password, hashedPassword, salt); } + private String timezone; + + public void setTimezone(String timezone) { + this.timezone = timezone != null ? TimeZone.getTimeZone(timezone).getID() : null; + } + + public String getTimezone() { + return timezone; + } } |