change TZ from unit_8 to int, negatives timezone
usage: localtime = TimeZone(UnixTime, -7); // CA USA = -7
This commit is contained in:
parent
30f8527eaa
commit
6be069cdb6
|
@ -72,7 +72,7 @@ class RTClock {
|
||||||
uint8_t second(time_t t) { breakTime(t, tmm); return tmm.second; }
|
uint8_t second(time_t t) { breakTime(t, tmm); return tmm.second; }
|
||||||
uint8_t isPM(time_t t) { return (hour(t)>=12); }
|
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, time_t alarm_time_t);
|
||||||
void createAlarm(voidFuncPtr function, struct tm_t & alarm_tm);
|
void createAlarm(voidFuncPtr function, struct tm_t & alarm_tm);
|
||||||
|
|
Loading…
Reference in New Issue