feat(py-monitor): add iso_from_epoch()
This commit is contained in:
1 parent
3e097c7704
commit
bf2ec896c0
1 file changed
+5
@@ -8,3 +8,8 @@ def iso_now():
|
||||
# UTC: NocoDB parses naive datetimes as UTC.
|
||||
return time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime())
|
||||
|
||||
|
||||
def iso_from_epoch(epoch):
|
||||
if not epoch:
|
||||
return None
|
||||
return time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(epoch))
|
||||
Reference in new issue
Block a user