diff options
author | Abyss777 <abyss@fox5.ru> | 2016-05-31 08:56:10 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-05-31 08:56:10 +0500 |
commit | 41c46575a92f746622c61b07004b7a0832712a54 (patch) | |
tree | 689b5ecf88d1e2df8d4166deab9ac7558f54d291 /src/org | |
parent | 80119f59a0d4b89396f5d7d57ba2d80257a8da79 (diff) | |
download | traccar-server-41c46575a92f746622c61b07004b7a0832712a54.tar.gz traccar-server-41c46575a92f746622c61b07004b7a0832712a54.tar.bz2 traccar-server-41c46575a92f746622c61b07004b7a0832712a54.zip |
- Renamed eventTime to serverTime
- Fixed bracket indentation
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/api/resource/EventResource.java | 2 | ||||
-rw-r--r-- | src/org/traccar/model/Event.java | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/org/traccar/api/resource/EventResource.java b/src/org/traccar/api/resource/EventResource.java index 4ea3e3b49..74a748ea5 100644 --- a/src/org/traccar/api/resource/EventResource.java +++ b/src/org/traccar/api/resource/EventResource.java @@ -35,5 +35,5 @@ public class EventResource extends BaseResource { @QueryParam("interval") int interval) throws SQLException { Context.getPermissionsManager().checkDevice(getUserId(), deviceId); return Context.getDataManager().getLastEvents(deviceId, type, interval); - } + } } diff --git a/src/org/traccar/model/Event.java b/src/org/traccar/model/Event.java index 75049c433..6de885c70 100644 --- a/src/org/traccar/model/Event.java +++ b/src/org/traccar/model/Event.java @@ -8,13 +8,13 @@ public class Event extends Message { this.setType(type); this.setDeviceId(deviceId); this.setPositionId(positionId); - this.eventTime = new Date(); + this.serverTime = new Date(); } public Event(String type, long deviceId) { this.setType(type); this.setDeviceId(deviceId); - this.eventTime = new Date(); + this.serverTime = new Date(); } public Event() { @@ -43,21 +43,21 @@ public class Event extends Message { public static final String TYPE_GEOFENCE_ENTER = "geofenceEnter"; public static final String TYPE_GEOFENCE_EXIT = "geofenceExit"; - private Date eventTime; + private Date serverTime; - public Date getEventTime() { - if (eventTime != null) { - return new Date(eventTime.getTime()); + public Date getServerTime() { + if (serverTime != null) { + return new Date(serverTime.getTime()); } else { return null; } } - public void setEventTime(Date eventTime) { - if (eventTime != null) { - this.eventTime = new Date(eventTime.getTime()); + public void setServerTime(Date serverTime) { + if (serverTime != null) { + this.serverTime = new Date(serverTime.getTime()); } else { - this.eventTime = null; + this.serverTime = null; } } |