diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-01-22 19:53:48 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-01-22 19:53:48 +1300 |
commit | 48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d (patch) | |
tree | 35a9c364f5659300b535834ccaaed737ed197a61 /src/org/traccar/model/Event.java | |
parent | 58ade656e2070387f95984f5851cbc41990467ba (diff) | |
download | trackermap-server-48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d.tar.gz trackermap-server-48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d.tar.bz2 trackermap-server-48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d.zip |
Optimize date assignment
Diffstat (limited to 'src/org/traccar/model/Event.java')
-rw-r--r-- | src/org/traccar/model/Event.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/org/traccar/model/Event.java b/src/org/traccar/model/Event.java index 47b60af01..465afeb35 100644 --- a/src/org/traccar/model/Event.java +++ b/src/org/traccar/model/Event.java @@ -64,19 +64,11 @@ public class Event extends Message { private Date serverTime; public Date getServerTime() { - if (serverTime != null) { - return new Date(serverTime.getTime()); - } else { - return null; - } + return serverTime; } public void setServerTime(Date serverTime) { - if (serverTime != null) { - this.serverTime = new Date(serverTime.getTime()); - } else { - this.serverTime = null; - } + this.serverTime = serverTime; } private long positionId; |