New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use zone.tab instead of files directly in /usr/share/zoneinfo #22
Comments
CCTZ does not control what is in /usr/share/zoneinfo. If that doesn't contain all the zones on your system, raise the issue with your vendor. Or, get the IANA data and install them yourself. zone.tab is only part of a suggested mechanism for choosing a timezone name based on country and geo position. In the IANA distribution the timezones named in zone.tab all correspond to actual zoneinfo files. You must choose a timezone name before asking CCTZ to load it. CCTZ only deals with actual zoneinfo files. |
Thank you for prompt response Bradley. even PST is missing on RHEL 6.. any more user-friendly workarounds? :-) |
"PST" is not a timezone. It is an abbreviation used by the "America/Los_Angeles" timezone during certain times of the year. It might also be an abbreviation used by some other random timezone. |
Yes, I understand.. At the same time there are timezone files for MST and EST in /usr/share/zoneinfo
Thanks. |
The other "timezone names" you call out (CST6CDT, EST, EST5EDT, MST, MST7MDT, and PST8PDT) are special cases in the zoneinfo source to deal with some historical decisions. I suggest avoiding them. |
You won't find them in the zone*.tab files, for example. |
You nailed it right there. Yep, they are missing in zone.tab too. I am puzzled how and when on Linux those files like PST are genenerated in /usr/share/zoneinfo ? |
Assuming you meant "PST8PDT" (remember, "PST" is not there), take a look at the "northamerica" file in the IANA distribution under the comment ...
At some point the compiled zoneinfo files included one named "PST8PDT" (for whatever reason) but whose contents would now be wrong. To guard against a failure to remove that file, the distribution includes a replacement with modern data (although it might not be what you expect---PST8PDT != America/Los_Angeles for some pre-1970 times, for example). The fear that these files wouldn't be removed is probably obsolete, and I think we'd all be better off if they were excluded from the IANA distribution. In the meantime I can only recommend ignoring them. |
Got it. Thanks a lot for the detailed explanation. |
You're welcome. I hope CCTZ is useful to you. We just released "v2" a few days ago, which includes a "civil-time" component. Take another look when you get a chance. |
Yep. It's a great library. It makes a lot of sense for heavy-threaded Impala to use cctz as there are performance penalties when using glibc functions, e.g. https://issues.cloudera.org/browse/IMPALA-3316 |
As per
http://unix.stackexchange.com/questions/35781/why-is-zone-tab-missing-so-many-time-zones
and
http://postgresql.nabble.com/A-renewed-plea-for-inclusion-of-zone-tab-td2005687.html
and
https://issues.cloudera.org/browse/IMPALA-3316
often there are subset of files in /usr/share/zoneinfo,
while /usr/share/zoneinfo/zone.tab always has complete information.
It would be more reliable to use Use zone.tab instead of files directly in /usr/share/zoneinfo/zone.tab instead of individual files?
The text was updated successfully, but these errors were encountered: