Skip to content

Commit

Permalink
Implemented better solution to handle negative timestamp seconds offset
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-H123 authored Nov 14, 2023
1 parent ccbc322 commit d2599bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_onButtonClickConfirm.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down

0 comments on commit d2599bd

Please sign in to comment.