aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/MainModule.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-18 22:30:15 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-18 22:30:15 -0700
commitf458cbe473bdc49157415a8bfc6441afd86b670e (patch)
tree787a8c80cb6ad16c5aaae06ecf81ffbdec2fa126 /src/main/java/org/traccar/MainModule.java
parent03169baaea991d3c343a65ebac3eb3242d743fd0 (diff)
downloadtrackermap-server-f458cbe473bdc49157415a8bfc6441afd86b670e.tar.gz
trackermap-server-f458cbe473bdc49157415a8bfc6441afd86b670e.tar.bz2
trackermap-server-f458cbe473bdc49157415a8bfc6441afd86b670e.zip
Option to force time override
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r--src/main/java/org/traccar/MainModule.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java
index 6fe8bad1c..3acd19b6a 100644
--- a/src/main/java/org/traccar/MainModule.java
+++ b/src/main/java/org/traccar/MainModule.java
@@ -59,6 +59,7 @@ import org.traccar.handler.GeolocationHandler;
import org.traccar.handler.HemisphereHandler;
import org.traccar.handler.MotionHandler;
import org.traccar.handler.RemoteAddressHandler;
+import org.traccar.handler.TimeHandler;
import org.traccar.handler.events.AlertEventHandler;
import org.traccar.handler.events.CommandResultEventHandler;
import org.traccar.handler.events.DriverEventHandler;
@@ -300,6 +301,15 @@ public class MainModule extends AbstractModule {
@Singleton
@Provides
+ public static TimeHandler provideTimeHandler(Config config) {
+ if (config.hasKey(Keys.TIME_OVERRIDE)) {
+ return new TimeHandler(config);
+ }
+ return null;
+ }
+
+ @Singleton
+ @Provides
public static DefaultDataHandler provideDefaultDataHandler(@Nullable DataManager dataManager) {
if (dataManager != null) {
return new DefaultDataHandler(dataManager);