19 lines
386 B
Python
19 lines
386 B
Python
from datetime import datetime
|
|
|
|
|
|
class tcolors:
|
|
HEADER = '\033[95m'
|
|
OKBLUE = '\033[94m'
|
|
OKCYAN = '\033[96m'
|
|
OKGREEN = '\033[92m'
|
|
WARNING = '\033[93m'
|
|
FAIL = '\033[91m'
|
|
ENDC = '\033[0m'
|
|
BOLD = '\033[1m'
|
|
UNDERLINE = '\033[4m'
|
|
|
|
|
|
def str_from_timestamp(timestamp: int):
|
|
date = datetime.fromtimestamp(timestamp)
|
|
return date.strftime('%d.%m.%y %T')
|