TZ and TZDIR env vars being overwritten in Arch & Suse Linux
Original Reporter info from Mantis: jwnx
-
Reporter name: Juliana Oliveira
Original Reporter info from Mantis: jwnx
- Reporter name: Juliana Oliveira
Description:
Dear maintainers,
In order to make Pascal reproducible on Linux, the Reproducible Builds team have been using TZ and TZDIR vars to force UTC timezone when analyzing ppudumps. Recently we found that this solution, which works as intended on Debian based distros AFAWK, is working neither on Arch Linux nor OpenSuse Tumbleweed. It appears that env vars are being overwritten by local timezone. A few examples follow:
| Debian Unstable
+------+--------------+---------+
| TZ | TZDIR | ppudump |
+------+--------------+---------+
| :UTC | /nonexistent | UTC |
| :UTC | --- | UTC |
| --- | --- | Local |
+------+--------------+---------+
| Ubuntu Bionic
+------+--------------+---------+
| TZ | TZDIR | ppudump |
+------+--------------+---------+
| :UTC | /nonexistent | UTC |
| :UTC | --- | UTC |
| --- | --- | Local |
+------+--------------+---------+
| OpenSuse Tumbleweed
+-------------------------+---------------------+---------+
| TZ | TZDIR | ppudump |
+-------------------------+---------------------+---------+
| :UTC | /nonexistent | Local |
| :UTC | --- | Local |
| :UTC | /usr/share/zoneinfo | Local |
| UTC | /usr/share/zoneinfo | Local |
| /usr/share/zoneinfo/UTC | --- | Local |
| --- | --- | Local |
+-------------------------+---------------------+---------+
| Arch
+-------------------------+---------------------+---------+
| TZ | TZDIR | ppudump |
+-------------------------+---------------------+---------+
| :UTC | /nonexistent | Local |
| :UTC | --- | Local |
| :UTC | /usr/share/zoneinfo | Local |
| UTC | /usr/share/zoneinfo | Local |
| /usr/share/zoneinfo/UTC | --- | Local |
| --- | --- | Local |
+-------------------------+---------------------+---------+
UTC timezones are only achieved on both Arch and Suse by linking UTC to /etc/localtime (ln -sf /usr/share/zoneinfo/UTC /etc/localtime)
Additional information:
Relates to the previous bug http://www.hu.freepascal.org/lists/fpc-devel/2015-November/036324.html
Mantis conversion info:
- Mantis ID: 32937
- OS: Linux
- OS Build: Latest
- Platform: Arch and Suse
- Version: 3.0.4