tzdata sets /etc/timezone to `/UTC`, not `Etc/UTC`
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
debconf (Debian) |
New
|
Unknown
|
|||
tzdata (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
When installed within the `ubuntu` Docker container, `tzdata` sets `etc/timezone` to `/UTC`, not `Etc/UTC`, which breaks applications that are reading `etc/timezone` and expecting a valid timezone name.
I'm guess that this wasn't noticed, since technically `/usr/share/
Here is a Dockerfile that reproduces the issue:
```dockerfile
FROM ubuntu
RUN apt-get update && \
apt-get install -y tzdata
```
Here is the output of `docker build`:
```
test (master)$ docker build --no-cache -t tztest .
Sending build context to Docker daemon 2.56kB
Step 1/3 : FROM ubuntu
---> 9140108b62dc
Step 2/3 : RUN apt-get update && apt install -y tzdata
---> Running in 03da406f73cb
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Get:17 http://
Fetched 16.2 MB in 4s (3919 kB/s)
Reading package lists...
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
tzdata
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 293 kB of archives.
After this operation, 4026 kB of additional disk space will be used.
Get:1 http://
debconf: delaying package configuration, since apt-utils is not installed
Fetched 293 kB in 1s (262 kB/s)
Selecting previously unselected package tzdata.
(Reading database ... 4121 files and directories currently installed.)
Preparing to unpack .../tzdata_
Unpacking tzdata (2020a-
Setting up tzdata (2020a-
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/
debconf: falling back to frontend: Teletype
Configuring tzdata
------------------
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
2. America 5. Arctic 8. Europe 11. SystemV
3. Antarctica 6. Asia 9. Indian 12. US
Geographic area:
Use of uninitialized value $_[1] in join or string at /usr/share/
Current default time zone: '/UTC'
Local time is now: Sun Oct 11 11:35:33 UTC 2020.
Universal Time is now: Sun Oct 11 11:35:33 UTC 2020.
Run 'dpkg-reconfigure tzdata' if you wish to change it.
Use of uninitialized value $val in substitution (s///) at /usr/share/
Use of uninitialized value $val in concatenation (.) or string at /usr/share/
Removing intermediate container 03da406f73cb
---> 1351f8569438
Step 3/3 : RUN dpkg-reconfigure tzdata
---> Running in f78304bec7fa
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/
debconf: falling back to frontend: Teletype
Configuring tzdata
------------------
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
2. America 5. Arctic 8. Europe 11. SystemV
3. Antarctica 6. Asia 9. Indian 12. US
Geographic area:
Use of uninitialized value $_[1] in join or string at /usr/share/
Current default time zone: '/UTC'
Local time is now: Sun Oct 11 11:35:35 UTC 2020.
Universal Time is now: Sun Oct 11 11:35:35 UTC 2020.
Use of uninitialized value $val in substitution (s///) at /usr/share/
Use of uninitialized value $val in concatenation (.) or string at /usr/share/
Removing intermediate container f78304bec7fa
---> 5852cb5533c8
Successfully built 5852cb5533c8
Successfully tagged tztest:latest
```
no longer affects: | zoneinfo |
summary: |
- tzdata sets /etc/timezone to `/UTC`, not `UTC` + tzdata sets /etc/timezone to `/UTC`, not `Etc/UTC` |
description: | updated |
Changed in tzdata (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in debconf (Debian): | |
status: | Unknown → New |
Changed in tzdata (Ubuntu): | |
importance: | Undecided → Medium |
Status changed to 'Confirmed' because the bug affects multiple users.