From 18f465b30178636de7da10d7cd2fc1fdcfaefd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl?= Date: Mon, 13 Nov 2023 18:45:05 +0100 Subject: [PATCH] Updated script to allow offset to exeed midnight in the past --- addons/markers/functions/fnc_onButtonClickConfirm.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/markers/functions/fnc_onButtonClickConfirm.sqf b/addons/markers/functions/fnc_onButtonClickConfirm.sqf index d121dfc469..4d00e4ce3b 100644 --- a/addons/markers/functions/fnc_onButtonClickConfirm.sqf +++ b/addons/markers/functions/fnc_onButtonClickConfirm.sqf @@ -30,7 +30,8 @@ if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then { case 2: { systemTimeUTC params ["", "", "", "_hour", "_min", "_sec"]; _hour = _hour + round (GVAR(timestampUTCOffset)); - _hour = abs (_hour % 24); + _hour = _hour < 0 ? _hour + _hour % 24 : _hour % 24; + _hour = if (Hour < 0) then { 24 + Hour }; _hour + _min/60 + _sec/3600 }; default {