[libcxx-commits] [libcxx] [libc++][chrono] Adds the sys_info class. (PR #85619)

Wu Yingcong via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 7 20:36:27 PDT 2024


yingcong-wu wrote:

Hi @mordante , I encounter some test failure with sys_info.zdump.pass.cpp in different OS.

Here are some os, tzdata version and zdump version first:

- `Red Hat Enterprise Linux 9.0`, `tzdata 2022a-rearguard`, `zdump (GNU libc) 2.34`
- `Red Hat Enterprise Linux 8.8`, `2023c-rearguard`, `zdump (GNU libc) 2.28`
- `Ubuntu 22.04.4 LTS`, `2024a`, `zdump (Ubuntu GLIBC 2.35-0ubuntu3.6) 2.35`
- `Ubuntu 24.04 LTS`, `2024a`, `zdump (Ubuntu GLIBC 2.39-0ubuntu8.1) 2.39`

**First:**
With RedHat9, libc++ and zdump have different results of `Asia/Dushanbe`, but that could be just outdated tzdata. I don't know if we are looking to support older version of tzdata or not.
```
# +05/+06 is from libcxx
bash> diff libcxx zdump
46,47c46,47
< Asia/Dushanbe  Sat Mar 30 20:00:00 1991 UT = Sun Mar 31 02:00:00 1991 +05/+06 isdst=1 gmtoff=21600
< Asia/Dushanbe  Sun Sep  8 20:59:59 1991 UT = Mon Sep  9 02:59:59 1991 +05/+06 isdst=1 gmtoff=21600
---
> Asia/Dushanbe  Sat Mar 30 20:00:00 1991 UT = Sun Mar 31 02:00:00 1991 +06 isdst=1 gmtoff=21600
> Asia/Dushanbe  Sun Sep  8 20:59:59 1991 UT = Mon Sep  9 02:59:59 1991 +06 isdst=1 gmtoff=21600
```

**Second:**
With zone `Etc/UTC`, only zdump with RedHat9 returns empty, just like libc++'s result. While
- ReaHat8: returns 620 lines
- Ubuntu22: returns 58 lines
- Ubuntu24: returns 58 lines

I don't know much about chrono, hope above information is useful. If you need more information, please let me know.


https://github.com/llvm/llvm-project/pull/85619


More information about the libcxx-commits mailing list