mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-22 11:40:05 +00:00
Ensure timestamp does not vary with timezone. (#2982)
This commit is contained in:
parent
6a9be627c7
commit
e8c3f9b0b4
@ -119,7 +119,7 @@ def describe(directory):
|
||||
# clock time with enviornment variable SOURCE_DATE_EPOCH
|
||||
# containing a (presumably) fixed timestamp.
|
||||
timestamp = int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
|
||||
formatted = datetime.date.fromtimestamp(timestamp).isoformat()
|
||||
formatted = datetime.datetime.utcfromtimestamp(timestamp).isoformat()
|
||||
return 'unknown hash, {}'.format(formatted)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user