9 lines
180 B
Python
9 lines
180 B
Python
"""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]) |