import time
def get_time_to_str(str_format='%Y-%m-%d %H:%M:%S'):
res = time.strftime(str_format, time.localtime(time.time()))
return res
def get_date_as_name():
return get_time_to_str('%Y-%m-%d')
import time
def get_time_to_str(str_format='%Y-%m-%d %H:%M:%S'):
res = time.strftime(str_format, time.localtime(time.time()))
return res
def get_date_as_name():
return get_time_to_str('%Y-%m-%d')