Need input - minimal tzdata install
Hi, We are trying to reduce the required base installation on containers. We are looking at ways to reduce the amount of timezone data needed. Specifically, we are considering providing a minimal/UTC-only tzdata package. Is this something that the tz project would consider providing? Would the tz project be willing to document a recommended minimum set of files for such an installation? Thanks, Patsy
On 7/19/21 2:42 PM, Patsy Griffin via tz wrote:
We are looking at ways to reduce the amount of timezone data needed. Specifically, we are considering providing a minimal/UTC-only tzdata package.
The definition of "minimal" depends on what software you're using. For tzcode, the minimal/UTC-only tzdata should be trivial: it's the empty set. In other words, install no data files whatsoever. This is because tzcode defaults to UTC if nothing is installed. I think glibc behaves the same way. If you have some POSIX-compatible library that doesn't default to UTC in this way, you can set TZ='UTC0' in the environment. Perhaps there's some software on your system that doesn't behave the same way that tzcode and glibc do, and that doesn't conform to POSIX. If so, you could use the following line: Zone Etc/UTC 0 - UTC as input to zic (or whatever other .zi parser your software is using), and then use TZ='Etc/UTC'. We could add some documentation along those lines, or a Makefile rule to generate that one-line file, or something like that; the details would depend on what you need.
On Jul 19, 2021, at 1:15 PM, Paul Eggert via tz <tz@iana.org> wrote:
On 7/19/21 2:42 PM, Patsy Griffin via tz wrote:
We are looking at ways to reduce the amount of timezone data needed. Specifically, we are considering providing a minimal/UTC-only tzdata package.
The definition of "minimal" depends on what software you're using. For tzcode, the minimal/UTC-only tzdata should be trivial: it's the empty set.
...unless you want the leap second processing (which would make the system not POSIX-compatible).
Hi Paul, Thanks for the input! On Mon, Jul 19, 2021 at 4:15 PM Paul Eggert via tz <tz@iana.org> wrote:
On 7/19/21 2:42 PM, Patsy Griffin via tz wrote:
We are looking at ways to reduce the amount of timezone data needed. Specifically, we are considering providing a minimal/UTC-only tzdata package.
The definition of "minimal" depends on what software you're using. For tzcode, the minimal/UTC-only tzdata should be trivial: it's the empty set. In other words, install no data files whatsoever. This is because tzcode defaults to UTC if nothing is installed. I think glibc behaves the same way. If you have some POSIX-compatible library that doesn't default to UTC in this way, you can set TZ='UTC0' in the environment.
Great! Defaulting to UTC is perfect. The Fedora glibc and tzdata package maintainers are working together towards providing this support. Perhaps there's some software on your system that doesn't behave the
same way that tzcode and glibc do, and that doesn't conform to POSIX. If so, you could use the following line:
Zone Etc/UTC 0 - UTC
as input to zic (or whatever other .zi parser your software is using), and then use TZ='Etc/UTC'.
Thanks for the example!
We could add some documentation along those lines, or a Makefile rule to generate that one-line file, or something like that; the details would depend on what you need.
Adding the documentation would be great. At this point, we don't see a need for Makefile changes but will keep you posted :-) Thank you, Patsy
participants (3)
-
Guy Harris -
Patsy Griffin -
Paul Eggert