Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting to allow UTC minutes offset for marker timestamp #1

Merged
merged 5 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading