11 lines
187 B
Python
11 lines
187 B
Python
"""Funzioni per timestamp
|
|
|
|
"""
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
def timestamp(t):
|
|
fmt = {"log": "%Y-%m-%d %H:%M:%S", "tms": "%Y%m%d%H%M%S"}
|
|
return datetime.now().strftime(fmt[t])
|