[libcxx-commits] [libcxx] [libc++][TZDB] Improves system time zone detection. (PR #127339)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 18 09:28:25 PST 2025
================
@@ -726,30 +759,29 @@ void __init_tzdb(tzdb& __tzdb, __tz::__rules_storage_type& __rules) {
//
// - The time zone name is the target of the symlink /etc/localtime
// relative to /usr/share/zoneinfo/
+ //
+ // - The file /etc/timezone. This text file contains the name of the time
+ // zone.
+ //
+ // On Linux systems it seems /etc/timezone is deprecated and being phased
+ // out. This file is used when /etc/localtime is not a symlink, but contains
+ // a copy of the binary time zone file. For more information and links see
+ // https://github.com/llvm/llvm-project/issues/105634
----------------
ldionne wrote:
```suggestion
// On Linux systems it seems /etc/timezone is deprecated and being phased
// out. This file is used when /etc/localtime does not exist, or when it exists but is not a symlink. For more information and links see
// https://github.com/llvm/llvm-project/issues/105634
```
IMO the sentence about "a copy of the binary time zone file" is not relevant since you don't check the contents anyway. The contents could be anything at all for what we know. I feel that removing that sentence makes the comment less confusing.
https://github.com/llvm/llvm-project/pull/127339
More information about the libcxx-commits
mailing list