soc: fix build_time format
This commit is contained in:
parent
b43d830fda
commit
21d38701df
|
@ -14,7 +14,7 @@ from migen import *
|
||||||
|
|
||||||
def get_version(with_time=True):
|
def get_version(with_time=True):
|
||||||
fmt = "%Y-%m-%d %H:%M:%S" if with_time else "%Y-%m-%d"
|
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):
|
def get_mem_data(filename_or_regions, endianness="big", mem_size=None):
|
||||||
# create memory regions
|
# create memory regions
|
||||||
|
|
|
@ -45,7 +45,7 @@ def colorer(s, color="bright"):
|
||||||
|
|
||||||
def build_time(with_time=True):
|
def build_time(with_time=True):
|
||||||
fmt = "%Y-%m-%d %H:%M:%S" if with_time else "%Y-%m-%d"
|
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 --------------------------------------------------------------------------------------
|
# SoCConstant --------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue