initial
This commit is contained in:
9
battilo/timefmt/timestamp_fmt.py
Normal file
9
battilo/timefmt/timestamp_fmt.py
Normal 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])
|
||||
Reference in New Issue
Block a user