Merge pull request #362 from csnol/master
Add TimeZone(UnixTime, HourOffset, MinuteOffset)
This commit is contained in:
commit
a03c84a635
|
@ -72,7 +72,11 @@ 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, int TZ) { return ( t + (TZ * SECS_PER_HOUR)); } // usage: localtime = TimeZone(UnixTime, 8); // Beijing timezone = 8
|
// Usage: localtime = TimeZone(UnixTime, 8);
|
||||||
|
time_t TimeZone(time_t t, int TZ) { return ( t + (TZ * SECS_PER_HOUR)); }
|
||||||
|
|
||||||
|
// Usage: 1. localtime = TimeZone(UnixTime, 9, 45) -> UTC +09:45 TimeZone;
|
||||||
|
time_t TimeZone(time_t t, int HTZ, int MTZ) { return ( t + (HTZ * SECS_PER_HOUR) + (MTZ * 60)); } // HTZ = Hour offset, MTZ = Minute offset
|
||||||
|
|
||||||
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