mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
Fix the syntax-check failures (which can be seen after python3-flake8-import-order package is installed) with the help of isort[1]: 289/316 libvirt:syntax-check / flake8 FAIL 5.24s exit status 2 [1]: https://pycqa.github.io/isort/ Signed-off-by: Han Han <hhan@redhat.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
13 lines
321 B
Python
Executable File
13 lines
321 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
from datetime import datetime, timezone
|
|
|
|
timestamp = os.environ.get('SOURCE_DATE_EPOCH', None)
|
|
timeformat = '%c %Z'
|
|
|
|
if timestamp:
|
|
print(datetime.fromtimestamp(int(timestamp), tz=timezone.utc).strftime(timeformat))
|
|
else:
|
|
print(datetime.now(tz=timezone.utc).strftime(timeformat))
|