Skip to content

Commit cadfb98

Browse files
committed
Fix _timezone_offset type and uniform type usage in TimeSerivice
1 parent c9e4315 commit cadfb98

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/utility/time/TimeService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ unsigned long TimeService::getTime()
9191
#endif
9292
}
9393

94-
void TimeService::setTimeZoneData(int offset, unsigned int dst_until)
94+
void TimeService::setTimeZoneData(long offset, unsigned long dst_until)
9595
{
9696
DEBUG_INFO("ArduinoIoTCloudTCP::%s offset[%d] dst_unitl[%ul]", __FUNCTION__, offset, dst_until);
9797
_timezone_offset = offset;

src/utility/time/TimeService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class TimeService
4848
void begin (ConnectionHandler * con_hdl);
4949
unsigned long getTime();
5050
unsigned long getLocalTime();
51-
void setTimeZoneData(int offset, unsigned int valid_until);
51+
void setTimeZoneData(long offset, unsigned long valid_until);
5252
static unsigned long getTimeFromString(const String& timeString);
5353

5454
private:
@@ -63,7 +63,7 @@ class TimeService
6363
static bool isTimeValid(unsigned long const time);
6464

6565
private:
66-
unsigned long _timezone_offset;
66+
long _timezone_offset;
6767
unsigned long _timezone_dst_until;
6868

6969
};

0 commit comments

Comments
 (0)