From: "Carlos O'Donell" <carlos-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Michael Kerrisk
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [patch] gettimeofday.2: Expand on the historic historical meaning of tz_dsttime.
Date: Thu, 10 Dec 2015 15:01:25 -0500 [thread overview]
Message-ID: <5669DA15.2050606@redhat.com> (raw)
Given that the NOTES in question are willing to discuss
hitory, I have clarified the use of tz_dsttime for non-Linux
and Linux to allow the reader to contrast that with the older
system usage.
On a non-Linux glibc the meaning of tz_dsttime is exactly
that of daylight for the current zone. It has been this way
since the beginning of glibc:
^28f540f (Roland McGrath 1995-02-18 01:27:10 +0000 52)
tz->tz_dsttime = __daylight;
On a Linux glibc the field has never been used.
Clarify the meaning of tz_dsttime for gettimeofday,
and for settimeofday distinctly for non-Linux and Linux
glibc cases (for historical completeness).
Signed-off-by: Carlos O'Donell <carlos-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
Cheers,
Carlos.
diff --git a/man2/gettimeofday.2 b/man2/gettimeofday.2
index 8006797..5df82e6 100644
--- a/man2/gettimeofday.2
+++ b/man2/gettimeofday.2
@@ -190,15 +190,30 @@ Traditionally, the fields of
were of type
.IR long .
-The
+On a non-Linux kernel, with glibc, the
+.I tz_dsttime
+field of
+.I struct timezone
+will be set to a non-zero value by
+.BR gettimeofday ()
+if the current timezone has ever had or will have a daylight saving
+rule applied. In this sense it exactly mirrors the meaning of
+.BR daylight (3)
+for the current zone.
+On Linux, with glibc, the setting of the
.I tz_dsttime
-field has never been used under Linux.
+field of
+.I struct timezone
+has never been used by
+.BR settimeofday ()
+or
+.BR gettimeofday ().
.\" it has not
.\" been and will not be supported by libc or glibc.
.\" Each and every occurrence of this field in the kernel source
.\" (other than the declaration) is a bug.
Thus, the following
-is purely of historic interest.
+is purely of historical interest.
On old systems, the field
.I tz_dsttime
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2015-12-10 20:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 20:01 Carlos O'Donell [this message]
[not found] ` <5669DA15.2050606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-12-16 14:13 ` [patch] gettimeofday.2: Expand on the historic historical meaning of tz_dsttime Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5669DA15.2050606@redhat.com \
--to=carlos-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).