Skip to content

Commit cd9a664

Browse files
committed
Fix _timezone_offset type and uniform type usage in TimeSerivice
1 parent 3cf18b2 commit cd9a664

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/utility/time/TimeService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ unsigned long TimeService::getTime()
9292
#endif
9393
}
9494

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

src/utility/time/TimeService.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TimeService
4949
void begin (ConnectionHandler * con_hdl);
5050
unsigned long getTime();
5151
unsigned long getLocalTime();
52-
void setTimeZoneData(int offset, unsigned int valid_until);
52+
void setTimeZoneData(long offset, unsigned long valid_until);
5353
/* Helper function to convert a timeString into a UNIX timestamp. The format specifiers match the POSIX function strptime()*/
5454
static unsigned long getTimeFromString(const String& timeString, const String& timeStringFormat);
5555

@@ -65,7 +65,7 @@ class TimeService
6565
static bool isTimeValid(unsigned long const time);
6666

6767
private:
68-
unsigned long _timezone_offset;
68+
long _timezone_offset;
6969
unsigned long _timezone_dst_until;
7070

7171
};

0 commit comments

Comments
 (0)