From 21d38701dfffeec63964ffc2ee0f0d63cb1405ef Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 11 Feb 2020 13:23:46 +0100 Subject: [PATCH] soc: fix build_time format --- litex/soc/integration/common.py | 2 +- litex/soc/integration/soc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litex/soc/integration/common.py b/litex/soc/integration/common.py index d07f05185..ef826a946 100644 --- a/litex/soc/integration/common.py +++ b/litex/soc/integration/common.py @@ -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 diff --git a/litex/soc/integration/soc.py b/litex/soc/integration/soc.py index 12860d9a3..9b63f997f 100755 --- a/litex/soc/integration/soc.py +++ b/litex/soc/integration/soc.py @@ -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 --------------------------------------------------------------------------------------