aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model/Device.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/model/Device.java')
-rw-r--r--src/org/traccar/model/Device.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java
index 7622f78cd..698505983 100644
--- a/src/org/traccar/model/Device.java
+++ b/src/org/traccar/model/Device.java
@@ -67,11 +67,19 @@ public class Device implements Factory {
private Date lastUpdate;
public Date getLastUpdate() {
- return lastUpdate;
+ if (lastUpdate != null) {
+ return new Date(lastUpdate.getTime());
+ } else {
+ return null;
+ }
}
public void setLastUpdate(Date lastUpdate) {
- this.lastUpdate = lastUpdate;
+ if (lastUpdate != null) {
+ this.lastUpdate = new Date(lastUpdate.getTime());
+ } else {
+ this.lastUpdate = null;
+ }
}
private long positionId;