Implemented better solution to handle negative timestamp seconds offset

This commit is contained in:
Daniël 2023-11-14 21:21:15 +01:00 committed by GitHub
parent ccbc32238e
commit d2599bd9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then {
systemTimeUTC params ["", "", "", "_hour", "_min", "_sec"];
_hourOffset = round (GVAR(timestampUTCOffset));
_hour = _hour + _hourOffset;
_min = if (_hourOffset < 0) then { _min - GVAR(timestampUTCMinutesOffset) } else { _min + GVAR(timestampUTCMinutesOffset) };
_min = _min - GVAR(timestampUTCMinutesOffset) * (_hourOffset / abs _hourOffset);
_time = (_hour + _min/60 + _sec/3600) % 24 + 24;
_time % 24
};