soc: fix build_time format

This commit is contained in:
Florent Kermarrec 2020-02-11 13:23:46 +01:00
parent b43d830fda
commit 21d38701df
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ from migen import *
def get_version(with_time=True):
fmt = "%Y-%m-%d %H:%M:%S" if with_time else "%Y-%m-%d"
return datetime.datetime.fromtimestamp(time.time()).strftime("%Y-%m-%d %H:%M:%S")
return datetime.datetime.fromtimestamp(time.time()).strftime(fmt)
def get_mem_data(filename_or_regions, endianness="big", mem_size=None):
# create memory regions

View File

@ -45,7 +45,7 @@ def colorer(s, color="bright"):
def build_time(with_time=True):
fmt = "%Y-%m-%d %H:%M:%S" if with_time else "%Y-%m-%d"
return datetime.datetime.fromtimestamp(time.time()).strftime("%Y-%m-%d %H:%M:%S")
return datetime.datetime.fromtimestamp(time.time()).strftime(fmt)
# SoCConstant --------------------------------------------------------------------------------------