This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v4 07/24] time: Deprecate struct timezone members
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 12 Aug 2019 20:20:21 +0000
- Subject: Re: [RFC v4 07/24] time: Deprecate struct timezone members
- Ironport-sdr: JTsm+IdosVkuKX/IujV1S80Twiu/7Enz2fvwB7vTqeJyn4vkCJBCNs0SWzy/LuWqIWN/FsfbZJ N+iXd/sqGq9TH1l3LHx9YnYx4z0QltT/LosVmB5uyQQDbLW9jXaHTSsctTql1rHwsZj58WQzCj LWsSFkQ8wY5cM5NM8b19NzYoIcYYJodBUJU+iY2sEwCseX9BA/xsv+ZXUNx/+MEo0O3bTX1f4c 1N8t834OzzbWjoOpqjcAtBSOYolWqAIlTiv+slQwACXRI88XL/Wh52YHHxVx9gbDcCYzsLxq0Y 1SE=
- Ironport-sdr: XbU9i4p/I5Ccb1MXrHmdBKAlSFacsqTLsNiX23lpABUyikTHUJ38wGVA2/HPE9NYxSdyjOFWzL g9/nGOc0y3/+yWkyVUMqaU82LYIEmVyRARth22tc64nm8BLbmcOzBfwEknLEjbaprN2RZZo86N U7m0SH+71po0ttRdXtFH1VDWZNG1vMEIu7IG7Day1+oDLR6aAOirAS+hcy2qmrnS46fgnBr2OI fjm5Nzx5yIbQuwRgWiBWv8gpgtRU7WSjp4+23R7ppcNGq8i+lnoRUvV7zIKzyZEPI3u/JNl/ab qME=
- References: <cover.1565398513.git.alistair.francis@wdc.com> <53894e78c91ed5e037077f7249b85cefe635ae1f.1565398513.git.alistair.francis@wdc.com> <CAKCAbMhSUKAG+_4cVjPhsY5G3FRqvObXoX8n+D-Q-7NAWV01-g@mail.gmail.com>
On Mon, 12 Aug 2019, Zack Weinberg wrote:
> - Our implementation of gettimeofday should always pass NULL for
> struct timezone to the kernel, and write zeroes to any struct timezone
> argument that is supplied. (This will transitively apply to ftime.)
Given that the kernel timezone is in fact meaningful (for the kernel's
interpretation of data shared with other OSes, such as the RTC clock and
some filesystem timestamps, that is kept in local time - just not for the
purpose for which the timezone settings in gettimeofday / settimeofday
were originally intended), I think gettimeofday should continue to read
that information from the kernel when the kernel provides it (i.e., the
uses of the kernel timezone mean that other syscalls do *not* supersede
the gettimeofday syscall for this purpose and so access to that
information from that syscall should continue to be provided).
--
Joseph S. Myers
joseph@codesourcery.com