soc: fix build_time format
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 11 Feb 2020 12:23:46 +0000 (13:23 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 11 Feb 2020 12:23:53 +0000 (13:23 +0100)
litex/soc/integration/common.py
litex/soc/integration/soc.py

index d07f05185e4b13fc76466babee8ac1003e238ba3..ef826a946a82e6dce67cb1630c2180f8b25487ac 100644 (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
index 12860d9a310f3c0a3cd5d7a7470644f34602912a..9b63f997fbbc8a2ff3ca75af70f4ab80bc0fc32b 100755 (executable)
@@ -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 --------------------------------------------------------------------------------------