linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] gettimeofday.2: Expand on the historic historical meaning of tz_dsttime.
@ 2015-12-10 20:01 Carlos O'Donell
       [not found] ` <5669DA15.2050606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos O'Donell @ 2015-12-10 20:01 UTC (permalink / raw)
  To: Michael Kerrisk, linux-man-u79uwXL29TY76Z2rM5mHXA

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] gettimeofday.2: Expand on the historic historical meaning of tz_dsttime.
       [not found] ` <5669DA15.2050606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2015-12-16 14:13   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-12-16 14:13 UTC (permalink / raw)
  To: Carlos O'Donell, linux-man-u79uwXL29TY76Z2rM5mHXA
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w

On 12/10/2015 09:01 PM, Carlos O'Donell wrote:
> 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>

Thanks, Carlos. Applied.

Cheers,

Michael


> ---
> 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
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-16 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-10 20:01 [patch] gettimeofday.2: Expand on the historic historical meaning of tz_dsttime Carlos O'Donell
     [not found] ` <5669DA15.2050606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-12-16 14:13   ` Michael Kerrisk (man-pages)

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).