* Brian Inglis via tz: >> It's also not possible to detect on some POSIX-like systems (that use >> the IANA database) whether the system administrator has used a >> specific IANA identifier to configure the system. Applications only >> see the data blob describing the time zone behavior and (sometimes) >> abbreviations, and that doesn't include the identifier. > > You should be able to figure it out whether using symlinks, hardlinks, > or check sums of some kind: > > $ head -v /etc/timezone; \ > tail -vn1 /etc/localtime; echo; \ > llgo /etc/localtime; echo; \ > find /usr/share/zoneinfo/ -inum `stat -L -c%i /etc/localtime`; echo; \ > cksum /etc/localtime; echo; \ > find /usr/share/zoneinfo/ -size `cksum /etc/localtime | cut -d' ' -f2`c \ > | xargs cksum > ==> /etc/timezone <== > America/Edmonton > ==> /etc/localtime <== > MST7MDT,M3.2.0,M11.1.0
Some systems (especially containers) have just /etc/localtime, and do not provide all those unused files under /usr/share/zoneinfo. Content-based matching fails for links and files that just happen to be the same (which would apply to Etc/Unknown, I expect). Thanks, Florian
