aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-06 15:00:06 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-06 15:00:06 -0700
commitb8f0c159aa3e13e902305e4b68ad7f851696b69c (patch)
tree0b18eb0abe219290b3f8e430cee8a7e711835e64 /src/main
parentd8bb9c055a3fcc15dfc92ea8238b4c26bf71f55c (diff)
downloadtrackermap-server-b8f0c159aa3e13e902305e4b68ad7f851696b69c.tar.gz
trackermap-server-b8f0c159aa3e13e902305e4b68ad7f851696b69c.tar.bz2
trackermap-server-b8f0c159aa3e13e902305e4b68ad7f851696b69c.zip
Add timezones API
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/api/resource/ServerResource.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/api/resource/ServerResource.java b/src/main/java/org/traccar/api/resource/ServerResource.java
index 2d17d5e47..f238e8905 100644
--- a/src/main/java/org/traccar/api/resource/ServerResource.java
+++ b/src/main/java/org/traccar/api/resource/ServerResource.java
@@ -34,6 +34,9 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.TimeZone;
@Path("server")
@Produces(MediaType.APPLICATION_JSON)
@@ -67,4 +70,10 @@ public class ServerResource extends BaseResource {
}
}
+ @Path("timezones")
+ @GET
+ public Collection<String> timezones() {
+ return Arrays.asList(TimeZone.getAvailableIDs());
+ }
+
}