From 3596b6af9b7413d2e7f110da448826b8ede06b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl?= <78355193+Daniel-H123@users.noreply.github.com> Date: Sun, 12 Nov 2023 22:20:28 +0100 Subject: [PATCH] Implemented review changes --- .../markers/functions/fnc_onButtonClickConfirm.sqf | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/addons/markers/functions/fnc_onButtonClickConfirm.sqf b/addons/markers/functions/fnc_onButtonClickConfirm.sqf index 7e5ec8cae9..d2cee43a68 100644 --- a/addons/markers/functions/fnc_onButtonClickConfirm.sqf +++ b/addons/markers/functions/fnc_onButtonClickConfirm.sqf @@ -25,9 +25,6 @@ if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then { private _time = []; switch (GVAR(timestampTimezone)) do { - default { - _time = dayTime; - }; case 1: { systemTime params ["", "", "", "_hour", "_min", "_sec"]; _time = _hour + _min/60 + _sec/3600; @@ -36,14 +33,12 @@ if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then { _offset = GVAR(timestampUTCOffset); systemTimeUTC params["", "", "", "_hour", "_min", "_sec"]; _hour = _hour + round(_offset); - if (_hour < 0) then { - _hour = 24 + _hour; - }; - if (_hour > 24) then { - _hour = _hour - 24; - }; + _hour = _hour % 24; _time = _hour + _min/60 + _sec/3600; }; + default { + _time = dayTime; + }; }; // add timestamp suffix