Skip to content

Commit

Permalink
Merge pull request #1 from Daniel-H123/markerUtcSysTime
Browse files Browse the repository at this point in the history
Allow UTC minutes offset for marker timestamp
  • Loading branch information
Daniel-H123 authored Nov 14, 2023
2 parents 5128345 + 991a2fb commit aa5208d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
7 changes: 4 additions & 3 deletions addons/markers/functions/fnc_onButtonClickConfirm.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then {
};
case 2: {
systemTimeUTC params ["", "", "", "_hour", "_min", "_sec"];
_hour = (_hour + round (GVAR(timestampUTCOffset))) % 24;
_hour = if (_hour < 0) then { 24 + _hour } else { _hour };
_hour + _min/60 + _sec/3600
_hour = _hour + round (GVAR(timestampUTCOffset));
_min = _min + GVAR(timestampUTCMinutesOffset);
_time = (_hour + _min/60 + _sec/3600) % 24 + 24;
_time % 24
};
default {
dayTime
Expand Down
11 changes: 11 additions & 0 deletions addons/markers/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ private _categoryName = format ["ACE %1", localize ELSTRING(map,Module_DisplayNa
true
] call CBA_fnc_addSetting;

[
QGVAR(TimestampUTCMinutesOffset), "LIST",
[LSTRING(TimestampUTCMinutesOffset), LSTRING(TimestampUTCMinutesOffsetDescription)],
[_categoryName, LLSTRING(Module_DisplayName)],
[
[0, 15, 30, 45],
[+00, +15, +30, +45],
0
]
] call CBA_fnc_addSetting;

[
QGVAR(timestampHourFormat), "LIST",
[LSTRING(TimestampHourFormat), LSTRING(TimestampHourFormatDescription)],
Expand Down
26 changes: 24 additions & 2 deletions addons/markers/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
<Korean>시간대</Korean>
</Key>
<Key ID="STR_ACE_Markers_TimestampTimezoneDescription">
<English>Change the time zone for the timestamp</English>
<English>Changes the time zone for the timestamp</English>
<Russian>Измените часовой пояс для метки времени</Russian>
<French>Modifiez le fuseau horaire pour l'horodatage</French>
<Japanese>タイムスタンプの時間帯を変更します</Japanese>
Expand Down Expand Up @@ -294,7 +294,7 @@
<Korean>UTC 오프셋</Korean>
</Key>
<Key ID="STR_ACE_Markers_TimestampUTCOffsetDescription">
<English>Change the time offset for the UTC timestamp</English>
<English>Changes the time offset for the UTC timestamp</English>
<Russian>Измените смещение времени для метки времени UTC</Russian>
<French>Modifier le décalage horaire pour l'horodatage UTC</French>
<Japanese>UTCタイムスタンプの時差を変更する</Japanese>
Expand All @@ -303,6 +303,28 @@
<German>Ändere die Zeitverschiebung für den UTC-Zeitstempel</German>
<Chinesesimp>更改UTC时间戳的时间偏移量</Chinesesimp>
<Korean>UTC 타임 스탬프의 시간 오프셋을 변경하십시오</Korean>
</Key>
<Key ID="STR_ACE_Markers_TimestampUTCMinutesOffset">
<English>UTC Minutes Offset</English>
<Russian>UTC Минутное Смещение</Russian>
<French>Décalage des minutes UTC</French>
<Japanese>UTC分オフセット</Japanese>
<Spanish>Desplazamiento de minutos UTC</Spanish>
<Polish>Przesunięcie minut UTC</Polish>
<German>UTC-Minutenversatz</German>
<Chinesesimp>UTC分钟偏移量</Chinesesimp>
<Korean>UTC 분 오프셋</Korean>
</Key>
<Key ID="STR_ACE_Markers_TimestampUTCMinutesOffsetDescription">
<English>Change the minute offset for the UTC timestamp</English>
<Russian>Изменить минутное смещение для времени UTC</Russian>
<French>Modifier le décalage des minutes pour l'horodatage UTC</French>
<Japanese>UTCタイムスタンプの分差を変更する</Japanese>
<Spanish>Cambiar el desplazamiento de minutos para la marca de tiempo UTC</Spanish>
<Polish>Zmień przesunięcie minut dla sygnatury czasowej UTC</Polish>
<German>Ändere den Minutenversatz für den UTC-Zeitstempel</German>
<Chinesesimp>更改UTC时间戳的分钟偏移量</Chinesesimp>
<Korean>UTC 타임 스탬프의 분 오프셋을 변경하십시오</Korean>
</Key>
<Key ID="STR_ACE_Markers_TimestampFormat">
<English>Timestamp Format</English>
Expand Down

0 comments on commit aa5208d

Please sign in to comment.