aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/History.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/History.php')
-rw-r--r--application/History.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/application/History.php b/application/History.php
index f93b0356..116b9264 100644
--- a/application/History.php
+++ b/application/History.php
@@ -135,7 +135,7 @@ class History
135 135
136 $item = [ 136 $item = [
137 'event' => $status, 137 'event' => $status,
138 'datetime' => (new DateTime())->format(DateTime::ATOM), 138 'datetime' => new DateTime(),
139 'id' => $id !== null ? $id : '', 139 'id' => $id !== null ? $id : '',
140 ]; 140 ];
141 $this->history = array_merge([$item], $this->history); 141 $this->history = array_merge([$item], $this->history);
@@ -177,7 +177,7 @@ class History
177 { 177 {
178 $comparaison = new DateTime('-'. $this->retentionTime . ' seconds'); 178 $comparaison = new DateTime('-'. $this->retentionTime . ' seconds');
179 foreach ($this->history as $key => $value) { 179 foreach ($this->history as $key => $value) {
180 if (DateTime::createFromFormat(DateTime::ATOM, $value['datetime']) < $comparaison) { 180 if ($value['datetime'] < $comparaison) {
181 unset($this->history[$key]); 181 unset($this->history[$key]);
182 } 182 }
183 } 183 }