aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model/User.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/model/User.java')
-rw-r--r--src/org/traccar/model/User.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java
index 274f2b2a2..71bb563a8 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,17 @@ public class User extends Extensible {
return Hashing.validatePassword(password, hashedPassword, salt);
}
+ private String timezone;
+
+ public void setTimezone(String timezone) {
+ if (timezone != null) {
+ this.timezone = TimeZone.getTimeZone(timezone).getID();
+ } else {
+ this.timezone = null;
+ }
+ }
+
+ public String getTimezone() {
+ return timezone;
+ }
}