summaryrefslogtreecommitdiff
path: root/src/EventRunner.php
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-10-04 11:32:04 +0200
committerDaniel Weipert <code@drogueronin.de>2023-10-04 11:32:04 +0200
commit94a3dd52da3ae180af37c6fd0e8c24b3562da388 (patch)
treeacced055660bfd65ca3e955ea26d412457ba4507 /src/EventRunner.php
parentfa00b957378a393f8edbfc98ef111d35d18ecb09 (diff)
initial commit 2
Diffstat (limited to 'src/EventRunner.php')
-rw-r--r--src/EventRunner.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/EventRunner.php b/src/EventRunner.php
index d2f1589..4f3bce9 100644
--- a/src/EventRunner.php
+++ b/src/EventRunner.php
@@ -16,6 +16,8 @@ class EventRunner
{
public function __construct()
{
+ // Events
+
$results = DB::query('select * from events where time < now()')->fetchAll();
foreach ($results as $row) {
@@ -79,8 +81,8 @@ class EventRunner
}
DB::query('delete from system where key=:key', ['key' => 'last_resource_tick']);
- $value = (new \DateTime((new \DateTime())->format('Y-m-d H:i')))->format('c');
- DB::query('insert into system (key,value) VALUES (:key,:value)', ['key' => 'last_resource_tick', 'value' => json_encode($value)]);
+ $lastResourceTickMinute = (new \DateTime((new \DateTime())->format('Y-m-d H:i')))->format('c');
+ DB::query('insert into system (key,value) VALUES (:key,:value)', ['key' => 'last_resource_tick', 'value' => json_encode($lastResourceTickMinute)]);
}
}
}