mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Implemented better solution to handle negative timestamp seconds offset
This commit is contained in:
parent
ccbc32238e
commit
d2599bd9aa
@ -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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user