Wrong timezone detection (always UTC)

Bug #2085147 reported by Skia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tzdata (Ubuntu)
New
Undecided
Unassigned

Bug Description

With tzdata 2024b-1ubuntu1 (plucky-proposed), the timezone is wrongly detected to be UTC, no matter what I do.

This is working fine with 2024a-4ubuntu1, which is what was released in Oracular.

Simple reproducer:
```cpp
#include <chrono>
#include <iostream>

int main() {
    const std::chrono::zoned_time cur_time{ std::chrono::current_zone(),
                                            std::chrono::system_clock::now() };
    std::cout << cur_time << '\n';
}
```
Compiled with `g++ -std=c++20 main.cpp`

```
$ ./a.out
2024-10-21 16:14:17.489489001 UTC
$ dpkg-query -W tzdata
tzdata 2024b-1ubuntu1
$ sudo apt install tzdata/oracular
[...]
$ dpkg-query -W tzdata
tzdata 2024a-4ubuntu1
$ ./a.out
2024-10-21 18:16:25.554620585 CEST
```

ProblemType: Bug
DistroRelease: Ubuntu 25.04
Package: tzdata 2024b-1ubuntu1
ProcVersionSignature: Ubuntu 6.8.0-45.45-generic 6.8.12
Uname: Linux 6.8.0-45-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.30.0-0ubuntu4
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: sway
Date: Mon Oct 21 14:11:36 2024
InstallationDate: Installed on 2023-08-02 (446 days ago)
InstallationMedia: Ubuntu 23.04 "Lunar Lobster" - Release amd64 (20230418)
PackageArchitecture: all
ProcEnviron:
 LANG=fr_FR.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/zsh
 TERM=alacritty
 XDG_RUNTIME_DIR=<set>
SourcePackage: tzdata
UpgradeStatus: Upgraded to plucky on 2024-06-12 (131 days ago)

Revision history for this message
Skia (hyask) wrote :
tags: added: block-proposed
Revision history for this message
Skia (hyask) wrote :

Funny `UpgradeStatus: Upgraded to plucky on 2024-06-12 (131 days ago)`, btw, but this is unrelated. :-)

Revision history for this message
Benjamin Drung (bdrung) wrote :

I can reproduce the failure on Ubuntu, but it works on Debian unstable:

```
# dpkg -s tzdata | grep ^Version
Version: 2024b-3
# dpkg-reconfigure tzdata
[...]
Current default time zone: 'Europe/Berlin'
Local time is now: Wed Oct 23 10:47:35 CEST 2024.
Universal Time is now: Wed Oct 23 08:47:35 UTC 2024.

# ls /etc/localtime -l
lrwxrwxrwx 1 root root 33 Oct 23 10:47 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
# ./a.out
2024-10-23 10:52:41.398553339 CEST
```

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.