mirror of https://github.com/arendst/Tasmota.git
Merge pull request #16772 from sfromis/Epoch-in-Berry-time-map
Epoch in Berry time map
This commit is contained in:
commit
058432c641
|
@ -37,6 +37,7 @@ static int m_dump(bvm *vm)
|
|||
time_insert(vm, "min", t->tm_min);
|
||||
time_insert(vm, "sec", t->tm_sec);
|
||||
time_insert(vm, "weekday", t->tm_wday);
|
||||
time_insert(vm, "epoch", ts);
|
||||
be_pop(vm, 1);
|
||||
be_return(vm);
|
||||
}
|
||||
|
|
|
@ -265,6 +265,7 @@ extern "C" {
|
|||
be_map_insert_int(vm, "min", t->tm_min);
|
||||
be_map_insert_int(vm, "sec", t->tm_sec);
|
||||
be_map_insert_int(vm, "weekday", t->tm_wday);
|
||||
be_map_insert_int(vm, "epoch", mktime(t));
|
||||
if (unparsed) be_map_insert_str(vm, "unparsed", unparsed);
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue