[myhdl-list] [PATCH] timezone in date in emitting HDL comment
Brought to you by:
jandecaluwe
From: KISHIMOTO, M. <ksm...@dd...> - 2013-01-09 02:38:33
|
Hello, I propose patch to print timezone in date in emitting HDL comment. diff -ur myhdl-0.7.ORG/myhdl/conversion/_toVHDL.py myhdl-0.7/myhdl/conversion/_toVHDL.py --- myhdl-0.7.ORG/myhdl/conversion/_toVHDL.py 2010-10-15 02:58:48.000000000 +0900 +++ myhdl-0.7/myhdl/conversion/_toVHDL.py 2013-01-07 16:27:12.000000000 +0900 @@ -27,7 +27,7 @@ import math import inspect -from datetime import datetime +import time #import compiler #from compiler import ast as astNode import ast @@ -197,7 +197,7 @@ def _writeFileHeader(f, fn): vars = dict(filename=fn, version=myhdl.__version__, - date=datetime.today().ctime() + date=time.strftime("%a %b %d %H:%M:%S %Y %Z") ) if not toVHDL.no_myhdl_header: print >> f, string.Template(myhdl_header).substitute(vars) diff -ur myhdl-0.7.ORG/myhdl/conversion/_toVerilog.py myhdl-0.7/myhdl/conversion/_toVerilog.py --- myhdl-0.7.ORG/myhdl/conversion/_toVerilog.py 2010-10-15 02:58:48.000000000 +0900 +++ myhdl-0.7/myhdl/conversion/_toVerilog.py 2013-01-07 16:27:44.000000000 +0900 @@ -27,7 +27,7 @@ import math import traceback import inspect -from datetime import datetime +import time import compiler # from compiler import ast as astNode import ast @@ -189,7 +189,7 @@ def _writeFileHeader(f, fn, ts): vars = dict(filename=fn, version=myhdl.__version__, - date=datetime.today().ctime() + date=time.strftime("%a %b %d %H:%M:%S %Y %Z") ) if not toVerilog.no_myhdl_header: print >> f, string.Template(myhdl_header).substitute(vars) |