From 3894932e4c2b5e39a1d66eb571970679b45d76a5 Mon Sep 17 00:00:00 2001 From: miroman-afk <74014189+miroman-afk@users.noreply.github.com> Date: Thu, 20 Jan 2022 12:09:01 +0300 Subject: [PATCH] v.2.7 Time fix --- commands/POSTRestoreShift.php | 3 ++- composer.json | 2 +- module.ini | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/commands/POSTRestoreShift.php b/commands/POSTRestoreShift.php index 7d6274b..95a219f 100644 --- a/commands/POSTRestoreShift.php +++ b/commands/POSTRestoreShift.php @@ -52,7 +52,8 @@ class POSTRestoreShift extends HRCCommand implements HRCCommandInterface { $old_date = date_create($terminal_online['next_at']); date_modify($old_date, '+1 hour'); $new_date = date_format($old_date, 'Y-m-d H:i:s'); - if (($nowTime + ($terminal_online['period']*60) >= $baseTime) { + $newTime = $nowTime + ($terminal_online['period'] * 60); + if ($newTime >= $baseTime) { $new_terminal_online = TerminalUpdate::find($terminal_online['id']); $new_terminal_online->next_at = $new_date; $new_terminal_online->save(); diff --git a/composer.json b/composer.json index 7e2bd38..c89a86b 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "hrc-admin/hello-world", - "version": "2.6", + "version": "2.7", "require": { "horeca/admin-php-module-core": "dev-master" }, diff --git a/module.ini b/module.ini index 9cf92d2..d386766 100644 --- a/module.ini +++ b/module.ini @@ -1,5 +1,5 @@ [info] name=V1 -version=2.6 +version=2.7 [build] -version=2.6 +version=2.7