This commit is contained in:
2020-03-22 17:58:59 +01:00
commit a178ba9026
11 changed files with 106 additions and 0 deletions

View File

@@ -0,0 +1 @@
"""Utilità per i formati timestamp"""

View File

@@ -0,0 +1,9 @@
"""Funzioni per timestamp
"""
import datetime
def timestamp(t):
fmt = {'log': '%Y-%m-%d %H:%M:%S', 'tms': '%Y%m%d%H%M%S'}
return datetime.datetime.now().strftime(fmt[t])