feat(Core/Common): add new helpers for time utility (#10207)
This commit is contained in:
parent
b5ab409614
commit
259b9133f6
60 changed files with 732 additions and 341 deletions
|
|
@ -1890,11 +1890,8 @@ public:
|
|||
{
|
||||
case EVENT_TIME:
|
||||
{
|
||||
// Get how many times it should ring
|
||||
time_t t = time(nullptr);
|
||||
tm local_tm;
|
||||
tzset(); // set timezone for localtime_r() -> fix issues due to daylight time
|
||||
localtime_r(&t, &local_tm);
|
||||
tm local_tm = Acore::Time::TimeBreakdown();
|
||||
uint8 _rings = (local_tm.tm_hour) % 12;
|
||||
_rings = (_rings == 0) ? 12 : _rings; // 00:00 and 12:00
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue