Skip to content

Commit

Permalink
Properly handle minute offset with negative timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-H123 committed Nov 14, 2023
1 parent ee9162b commit ccbc322
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/markers/functions/fnc_onButtonClickConfirm.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then {
};
case 2: {
systemTimeUTC params ["", "", "", "_hour", "_min", "_sec"];
_hour = _hour + round (GVAR(timestampUTCOffset));
_min = _min + GVAR(timestampUTCMinutesOffset);
_hourOffset = round (GVAR(timestampUTCOffset));
_hour = _hour + _hourOffset;
_min = if (_hourOffset < 0) then { _min - GVAR(timestampUTCMinutesOffset) } else { _min + GVAR(timestampUTCMinutesOffset) };
_time = (_hour + _min/60 + _sec/3600) % 24 + 24;
_time % 24
};
Expand Down

0 comments on commit ccbc322

Please sign in to comment.