summaryrefslogtreecommitdiffstatshomepage
path: root/ports/esp32
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-09-14 00:07:12 +1000
committerDamien George <damien@micropython.org>2020-09-18 16:25:36 +1000
commitbd7af6151d605d3fc8f70cb9ddf45b2fd7881f08 (patch)
tree7ef14fe3309c15b6518f656151bc8fafc842be14 /ports/esp32
parentb28758054b586fe41f56e462856d89f28c5e3f6a (diff)
downloadmicropython-bd7af6151d605d3fc8f70cb9ddf45b2fd7881f08.tar.gz
micropython-bd7af6151d605d3fc8f70cb9ddf45b2fd7881f08.zip
ports: Add utime.gmtime() function.
To portably get the Epoch. This is simply aliased to localtime() on ports that are not timezone aware. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/esp32')
-rw-r--r--ports/esp32/modutime.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/esp32/modutime.c b/ports/esp32/modutime.c
index 0325bd4693..1f93ce6c30 100644
--- a/ports/esp32/modutime.c
+++ b/ports/esp32/modutime.c
@@ -85,6 +85,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(time_time_obj, time_time);
STATIC const mp_rom_map_elem_t time_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_utime) },
+ { MP_ROM_QSTR(MP_QSTR_gmtime), MP_ROM_PTR(&time_localtime_obj) },
{ MP_ROM_QSTR(MP_QSTR_localtime), MP_ROM_PTR(&time_localtime_obj) },
{ MP_ROM_QSTR(MP_QSTR_mktime), MP_ROM_PTR(&time_mktime_obj) },
{ MP_ROM_QSTR(MP_QSTR_time), MP_ROM_PTR(&time_time_obj) },