Skip to content

Commit 8439b01

Browse files
committed
setTimeZoneData cosmetic changes
1 parent ada180c commit 8439b01

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/utility/time/TimeService.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,12 @@ void TimeService::setSyncInterval(unsigned long seconds)
156156

157157
void TimeService::setTimeZoneData(long offset, unsigned long dst_until)
158158
{
159-
if(_timezone_offset != offset)
160-
DEBUG_DEBUG("ArduinoIoTCloudTCP::%s tz_offset: [%d]", __FUNCTION__, offset);
161-
_timezone_offset = offset;
162-
163-
if(_timezone_dst_until != dst_until)
164-
DEBUG_DEBUG("ArduinoIoTCloudTCP::%s tz_dst_unitl: [%ul]", __FUNCTION__, dst_until);
165-
_timezone_dst_until = dst_until;
166-
167-
_is_tz_configured = true;
159+
if(_timezone_offset != offset || _timezone_dst_until != dst_until) {
160+
DEBUG_DEBUG("ArduinoIoTCloudTCP::%s offset: %d dst_unitl %ul", __FUNCTION__, offset, dst_until);
161+
_timezone_offset = offset;
162+
_timezone_dst_until = dst_until;
163+
_is_tz_configured = true;
164+
}
168165
}
169166

170167
unsigned long TimeService::getLocalTime()

0 commit comments

Comments
 (0)