From 53a8021fbf57facbddea280c147f26de825bdcd5 Mon Sep 17 00:00:00 2001 From: Timothy Lovelock Date: Sat, 12 Dec 2020 20:27:25 +0100 Subject: [PATCH] Fix compatability with ESP* devices which don't support gmtime -- use locatime instead --- microRESTCli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/microRESTCli.py b/microRESTCli.py index c9286e0..78edf96 100755 --- a/microRESTCli.py +++ b/microRESTCli.py @@ -4,7 +4,11 @@ """ from microWebCli import MicroWebCli -from time import gmtime, mktime +try : + from time import gmtime +except : + from time import localtime as gmtime # Correct error where gmtime doesn't exist in ESP32 module +from time import mktime class MicroRESTCli :