aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/Position.java2
-rw-r--r--src/org/traccar/model/Server.java11
-rw-r--r--src/org/traccar/model/User.java10
3 files changed, 23 insertions, 0 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index aeea83773..1a1db717f 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -79,6 +79,8 @@ public class Position extends Message {
public static final String PREFIX_ADC = "adc";
public static final String PREFIX_IO = "io";
public static final String PREFIX_COUNT = "count";
+ public static final String PREFIX_IN = "in";
+ public static final String PREFIX_OUT = "out";
public static final String ALARM_GENERAL = "general";
public static final String ALARM_SOS = "sos";
diff --git a/src/org/traccar/model/Server.java b/src/org/traccar/model/Server.java
index b588a4de0..4ded65204 100644
--- a/src/org/traccar/model/Server.java
+++ b/src/org/traccar/model/Server.java
@@ -15,6 +15,8 @@
*/
package org.traccar.model;
+import java.util.TimeZone;
+
import org.traccar.helper.Log;
public class Server extends Extensible {
@@ -166,4 +168,13 @@ public class Server extends Extensible {
this.coordinateFormat = coordinateFormat;
}
+ private String timezone;
+
+ public void setTimezone(String timezone) {
+ this.timezone = timezone != null ? TimeZone.getTimeZone(timezone).getID() : null;
+ }
+
+ public String getTimezone() {
+ return timezone;
+ }
}
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;
+ }
}