change TZ from unit_8 to int, negatives timezone

usage: localtime = TimeZone(UnixTime, -7);   // CA USA = -7
This commit is contained in:
csnol 2017-09-13 11:02:24 +08:00 committed by GitHub
parent 30f8527eaa
commit 6be069cdb6
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class RTClock {
uint8_t second(time_t t) { breakTime(t, tmm); return tmm.second; }
uint8_t isPM(time_t t) { return (hour(t)>=12); }
time_t TimeZone(time_t t, uint8_t TZ) { return ( t - (TZ * SECS_PER_HOUR)); } // usage: localtime = TimeZone(UnixTime, 8); // Beijing timezone = 8
time_t TimeZone(time_t t, int TZ) { return ( t - (TZ * SECS_PER_HOUR)); } // usage: localtime = TimeZone(UnixTime, 8); // Beijing timezone = 8
void createAlarm(voidFuncPtr function, time_t alarm_time_t);
void createAlarm(voidFuncPtr function, struct tm_t & alarm_tm);