Are you thinking of mgos_uptime()? This returns time in seconds since last reboot.
No, I want date time.
struct tm* timeinfo = localtime(&now);
Unix epoch time:
Thanks. Your methods work. I didn't realize I could call time function as in linux system.
There is some POSIX mixed in. Nice!
@facat If you check the source of the Time.now() , you can see that the function double mg_time(void) is ffi-ed.