Hacker News new | ask | show | jobs
by sandGorgon 3401 days ago
does anyone know if this impacts docker images as well ?
3 comments

Yes, at least the Docker images that use glibc as their libc. (eg, most Debian/Ubuntu images)

It looks like musl, which is used on Alpine Linux images for example, will only read it once, and then cache it:

https://github.com/esmil/musl/blob/master/src/time/__tz.c#L1...

It has a mutex/lock around the use of the TZ info, but avoids re-stat'ing the localtime file.

This is the best part of HN. Not only did you answer GP's question in 6 minutes, but you link to the exact line of the source code.
If you havn't set the TZ variable in the image, then yes.
I would be surprised if this doesn't. There's nothing specific about docker when running this C code from any other processes running on a Linux host.