diff options
author | Guilherme Gallo <guilherme.gallo@collabora.com> | 2023-04-18 00:53:13 -0300 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-04-19 14:36:37 +0000 |
commit | 710b568dcdab41963f953599acc2497578a3b82e (patch) | |
tree | 909f850ffa7b14baaff23a697f89ace224e572ce /.gitlab-ci | |
parent | 5c5aec15b15c3eba4d1908f1c85e0dbc9bc5f37c (diff) | |
download | mesa-710b568dcdab41963f953599acc2497578a3b82e.tar.gz |
ci/lava: Force use of UTC timezones
LAVA farm is giving datetime in UTC timezone, let's standardize it
locally for the script run, so datetimes coming from LAVA proxy calls
will be at the same timezone as the ones we use in structural logging
and traces.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x | .gitlab-ci/lava/lava_job_submitter.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.gitlab-ci/lava/lava_job_submitter.py b/.gitlab-ci/lava/lava_job_submitter.py index c2b6697efbb..39d07deac40 100755 --- a/.gitlab-ci/lava/lava_job_submitter.py +++ b/.gitlab-ci/lava/lava_job_submitter.py @@ -466,5 +466,11 @@ if __name__ == "__main__": # more buffering sys.stdout.reconfigure(line_buffering=True) sys.stderr.reconfigure(line_buffering=True) + # LAVA farm is giving datetime in UTC timezone, let's set it locally for the + # script run. + # Setting environ here will not affect the system time, as the os.environ + # lifetime follows the script one. + environ["TZ"] = "UTC" + time.tzset() fire.Fire(LAVAJobSubmitter) |