Skip to content

Commit c4b3e07

Browse files
Copilotstritti
andcommitted
Fix clang-format violations: remove manual variable alignment spacing
Co-authored-by: stritti <184547+stritti@users.noreply.github.com>
1 parent c1d2d70 commit c4b3e07

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

src/TimeClientHelper.cpp

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,16 @@ 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] = {
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}};
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}};
7170

7271
int _selectedTimezoneIndex = 0; // Default to Central European Time
7372

@@ -160,14 +159,16 @@ String getTimeInfoFor(int index) {
160159
}
161160

162161
String getFormattedTime(time_t rawTime) {
163-
unsigned long hours = (rawTime % 86400L) / 3600;
164-
String hoursStr = hours < 10 ? "0" + String(hours) : String(hours);
162+
unsigned long hours = (rawTime % 86400L) / 3600;
163+
String hoursStr = hours < 10 ? "0" + String(hours) : String(hours);
165164

166-
unsigned long minutes = (rawTime % 3600) / 60;
167-
String minuteStr = minutes < 10 ? "0" + String(minutes) : String(minutes);
165+
unsigned long minutes = (rawTime % 3600) / 60;
166+
String minuteStr =
167+
minutes < 10 ? "0" + String(minutes) : String(minutes);
168168

169-
unsigned long seconds = rawTime % 60;
170-
String secondStr = seconds < 10 ? "0" + String(seconds) : String(seconds);
169+
unsigned long seconds = rawTime % 60;
170+
String secondStr =
171+
seconds < 10 ? "0" + String(seconds) : String(seconds);
171172

172173
return hoursStr + ":" + minuteStr + ":" + secondStr;
173174
}

src/Timer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tm getCurrentDateTime() {
1212

1313
// Mark as invalid if time sync has failed
1414
if (!isTimeSyncValid() || t < MIN_VALID_TIME) {
15-
timeinfo.tm_year = -1; // Sentinel value for invalid time
15+
timeinfo.tm_year = -1;
1616
}
1717

1818
return timeinfo;

0 commit comments

Comments
 (0)