aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model/Server.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-03-13 17:52:28 +0500
committerAbyss777 <abyss@fox5.ru>2017-03-13 17:52:28 +0500
commit2309d53f52f25efe00f2195a58c448506a2605ab (patch)
tree9fdddd2384e4e331c1642f919d3db4fb1621cccb /src/org/traccar/model/Server.java
parent633bed5cd14c16d53c7b84ed2c6586915467e1a8 (diff)
downloadtrackermap-server-2309d53f52f25efe00f2195a58c448506a2605ab.tar.gz
trackermap-server-2309d53f52f25efe00f2195a58c448506a2605ab.tar.bz2
trackermap-server-2309d53f52f25efe00f2195a58c448506a2605ab.zip
- Add timezone field to User and Server model
- Pass Velocity DateTool to templates - Adjusted templates to use timezone
Diffstat (limited to 'src/org/traccar/model/Server.java')
-rw-r--r--src/org/traccar/model/Server.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/org/traccar/model/Server.java b/src/org/traccar/model/Server.java
index b588a4de0..db3f021a9 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,17 @@ public class Server extends Extensible {
this.coordinateFormat = coordinateFormat;
}
+ 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;
+ }
}