Skip to content

Commit c1d2d70

Browse files
Copilotstritti
andcommitted
Fix clang-format and EditorConfig linting errors in Timer.cpp and TimeClientHelper.cpp
Co-authored-by: stritti <184547+stritti@users.noreply.github.com>
1 parent 1c03efd commit c1d2d70

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

src/TimeClientHelper.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,17 @@ Timezone Japan(JST, JST);
5757
TimeChangeRule CST_CHINA = {"CST", First, Sun, Mar, 0, 8 * 60}; // UTC + 8 hours
5858
Timezone China(CST_CHINA, CST_CHINA);
5959

60-
TimeZoneInfo _timezones[10] = {{"Central European", &Europe},
61-
{"Eastern European", &EasternEurope},
62-
{"Western European", &WesternEurope},
63-
{"US Eastern", &USEastern},
64-
{"US Central", &USCentral},
65-
{"US Mountain", &USMountain},
66-
{"US Pacific", &USPacific},
67-
{"Australian Eastern", &AustralianEastern},
68-
{"Japan", &Japan},
69-
{"China", &China}};
60+
TimeZoneInfo _timezones[10] = {
61+
{"Central European", &Europe},
62+
{"Eastern European", &EasternEurope},
63+
{"Western European", &WesternEurope},
64+
{"US Eastern", &USEastern},
65+
{"US Central", &USCentral},
66+
{"US Mountain", &USMountain},
67+
{"US Pacific", &USPacific},
68+
{"Australian Eastern", &AustralianEastern},
69+
{"Japan", &Japan},
70+
{"China", &China}};
7071

7172
int _selectedTimezoneIndex = 0; // Default to Central European Time
7273

src/Timer.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* Returns time with tm_year = -1 if time sync is invalid
77
*/
88
tm getCurrentDateTime() {
9-
TimeChangeRule* tcr = NULL;
10-
time_t t = getTimeFor(getTimezoneIndex(), &tcr);
11-
struct tm timeinfo = *localtime(&t);
9+
TimeChangeRule* tcr = NULL;
10+
time_t t = getTimeFor(getTimezoneIndex(), &tcr);
11+
struct tm timeinfo = *localtime(&t);
1212

1313
// Mark as invalid if time sync has failed
1414
if (!isTimeSyncValid() || t < MIN_VALID_TIME) {
@@ -19,19 +19,19 @@ tm getCurrentDateTime() {
1919
}
2020

2121
tm getStartTime(TimerSetting timerSetting) {
22-
tm startTime = getCurrentDateTime();
22+
tm startTime = getCurrentDateTime();
2323
startTime.tm_hour = timerSetting.timerStartHour;
24-
startTime.tm_min = timerSetting.timerStartMinutes;
25-
startTime.tm_sec = 0;
24+
startTime.tm_min = timerSetting.timerStartMinutes;
25+
startTime.tm_sec = 0;
2626

2727
return startTime;
2828
}
2929

3030
tm getEndTime(TimerSetting timerSetting) {
31-
tm endTime = getCurrentDateTime();
31+
tm endTime = getCurrentDateTime();
3232
endTime.tm_hour = timerSetting.timerEndHour;
33-
endTime.tm_min = timerSetting.timerEndMinutes;
34-
endTime.tm_sec = 0;
33+
endTime.tm_min = timerSetting.timerEndMinutes;
34+
endTime.tm_sec = 0;
3535

3636
return endTime;
3737
}

0 commit comments

Comments
 (0)