aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/model/Device.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/main/java/org/traccar/model/Device.java b/src/main/java/org/traccar/model/Device.java
index 836a6709c..219f078ed 100644
--- a/src/main/java/org/traccar/model/Device.java
+++ b/src/main/java/org/traccar/model/Device.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2022 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -64,20 +64,12 @@ public class Device extends GroupedModel {
private Date lastUpdate;
public Date getLastUpdate() {
- if (lastUpdate != null) {
- return new Date(lastUpdate.getTime());
- } else {
- return null;
- }
+ return this.lastUpdate;
}
@QueryExtended
public void setLastUpdate(Date lastUpdate) {
- if (lastUpdate != null) {
- this.lastUpdate = new Date(lastUpdate.getTime());
- } else {
- this.lastUpdate = null;
- }
+ this.lastUpdate = lastUpdate;
}
private long positionId;