diff --git a/lib/libesp32/berry/src/be_timelib.c b/lib/libesp32/berry/src/be_timelib.c index 7b779aa36..a7938e4b7 100644 --- a/lib/libesp32/berry/src/be_timelib.c +++ b/lib/libesp32/berry/src/be_timelib.c @@ -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); } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino index a90a25916..31206442d 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino @@ -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); }