feat(py-monitor): add iso_from_epoch()
This commit is contained in:
1 parent
4c59af3aad
commit
067387baee
1 file changed
+4
@@ -9,3 +9,7 @@ def iso_now():
|
||||
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