From: JWP <elseifthen-KK0ffGbhmjU@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH[V2] 4/5] tzset.3: Add Environment section
Date: Wed, 28 Jan 2015 18:52:22 -0500 [thread overview]
Message-ID: <54C97636.4000201@gmx.com> (raw)
In-Reply-To: <54C4F9E7.6090104-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 01/25/2015 09:12 AM, Michael Kerrisk (man-pages) wrote:
>> Also not used is:
>> /usr/share/zoneinfo/posixrules
>>
>> STEPS TO REPRODUCE NO posixrules:
>>
>> TZ=EST+5EDT,M1.3.0/2,M10.5.0/2 date
>> Sun Jan 18 14:01:24 EDT 2015
>> TZ=EST+5EDT,M1.4.0/2,M10.5.0/2 date
>> Sun Jan 18 13:01:27 EST 2015
>
> Two questions:
> * I need some help with the shell output above. How does
> it demonstrate that posixrules is not used?
> * Are you sure about this? A cursory grep through the
> glibc source shows instances of the string "posixrules".
> See also the zic(8) man page.
Good catch Michael, I was indeed wrong. I based my position on the
following information from the zoneinfo Makefile:
# (When a POSIX-style environment variable is handled, the rules in the
# template file are used to determine "spring forward" and "fall back" days and
# times; the environment variable itself specifies UT offsets of standard and
# summer time.)
As you correctly pointed out, I should have looked at what glibc is
doing, not zoneinfo. Upon reviewing the glibc source the poxsixrules are
being used for very specific TZ strings that can be represented as:
[:]stdoffsetdst[offset][,]
If anything follows the above string, even invalid data, posixrules will
not be used. Below is some shell output demonstrating this.
I've posted v3 of this patch that includes the posixrule file, and a new
patch that adds a description of the file.
In the process of reading the source I have found a few more
discrepancies in the man-page... I will address those later.
Thank you for the heads up on not nesting brackets in patch titles, and for
taking the time to review and commit my work.
PS: zic's -l and -p options are just a user convenience to create the
localtime and posixrules links in the zoneinfo directory. zic doesn't
actually use the posixrules file for compiling.
In this demo the posixrules file is hard linked to America/New_York.
Notice the change to standard time when it is used.
$ TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0/02:00:00,M3.3.0/02:00:00" \
> strace -eopen date 2>&1 | grep -Ei 'posixrules|jan'
Thu Jan 29 06:53:01 NZDT 2015
$ TZ="NZST-12:00:00NZDT-13:00:00,ANYTHING" \
> strace -eopen date 2>&1 | grep -Ei 'posixrules|jan'
Thu Jan 29 06:53:35 NZDT 2015
$ TZ="NZST-12:00:00NZDT,ANYTHING" \
> strace -eopen date 2>&1 | grep -Ei 'posixrules|jan'
Thu Jan 29 06:53:58 NZDT 2015
$ TZ="NZST-12:00:00NZDT-13:00:00," \
> strace -eopen date 2>&1 | grep -Ei 'posixrules|jan'
open("/usr/share/zoneinfo/posixrules", O_RDONLY|O_CLOEXEC) = 3
Thu Jan 29 05:54:58 NZST 2015
$ TZ="NZST-12:00:00NZDT," \
> strace -eopen date 2>&1 | grep -Ei 'posixrules|jan'
open("/usr/share/zoneinfo/posixrules", O_RDONLY|O_CLOEXEC) = 3
Thu Jan 29 05:55:13 NZST 2015
$ TZ="NZST-12:00:00NZDT" \
> strace -eopen date 2>&1 | grep -Ei 'posixrules|jan'
open("/usr/share/zoneinfo/posixrules", O_RDONLY|O_CLOEXEC) = 3
Thu Jan 29 05:55:30 NZST 2015
--
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 prev parent reply other threads:[~2015-01-28 23:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-18 0:30 [PATCH][COVER LETTER] tzset.3: correct file paths and TZ use JWP
[not found] ` <54BAFE98.2090402-KK0ffGbhmjU@public.gmane.org>
2015-01-18 0:34 ` [PATCH] " JWP
[not found] ` <54BAFFAE.2020106-KK0ffGbhmjU@public.gmane.org>
2015-01-18 11:02 ` Michael Kerrisk (man-pages)
[not found] ` <54BB92AE.4090604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-23 17:29 ` JWP
[not found] ` <54C28516.7070802-KK0ffGbhmjU@public.gmane.org>
2015-01-25 13:43 ` Michael Kerrisk (man-pages)
2015-01-18 20:00 ` [PATCH[V2] 1/5] tzset.3: filespec omitted incorrect JWP
[not found] ` <54BC10C7.1030706-KK0ffGbhmjU@public.gmane.org>
2015-01-25 14:11 ` Michael Kerrisk (man-pages)
2015-01-18 20:02 ` [PATCH[V2] 2/5] tzset.3: First TZ specification clarification JWP
[not found] ` <54BC1172.5060100-KK0ffGbhmjU@public.gmane.org>
2015-01-25 14:10 ` Michael Kerrisk (man-pages)
2015-01-18 20:04 ` [PATCH[V2] 3/5] tzset.3: correct system timezone file path JWP
[not found] ` <54BC11E2.9020906-KK0ffGbhmjU@public.gmane.org>
2015-01-25 14:11 ` Michael Kerrisk (man-pages)
2015-01-18 20:07 ` [PATCH[V2] 4/5] tzset.3: Add Environment section JWP
[not found] ` <54BC126E.1080904-KK0ffGbhmjU@public.gmane.org>
2015-01-25 14:12 ` Michael Kerrisk (man-pages)
[not found] ` <54C4F9E7.6090104-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-28 23:52 ` JWP [this message]
2015-01-29 0:09 ` [PATCH V3 1/1] " J William Piggott
[not found] ` <54C97A2D.2050908-KK0ffGbhmjU@public.gmane.org>
2015-01-29 5:50 ` Michael Kerrisk (man-pages)
[not found] ` <54C9CA11.207-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-29 16:27 ` [PATCH V4 " J William Piggott
[not found] ` <54CA5F5B.7070405-KK0ffGbhmjU@public.gmane.org>
2015-01-30 6:04 ` Michael Kerrisk (man-pages)
2015-01-29 0:13 ` [PATCH 1/1] tzset.3: Add description for posixrules file J William Piggott
[not found] ` <54C97B45.2070300-KK0ffGbhmjU@public.gmane.org>
2015-01-29 5:51 ` Michael Kerrisk (man-pages)
[not found] ` <54C9CA67.4080009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-29 16:31 ` [PATCH V2 " J William Piggott
[not found] ` <54CA604A.1050500-KK0ffGbhmjU@public.gmane.org>
2015-01-30 6:04 ` Michael Kerrisk (man-pages)
2015-01-18 20:10 ` [PATCH[V2] 5/5] tzset.3: TZ filespec omitts the colon JWP
[not found] ` <54BC132A.8090504-KK0ffGbhmjU@public.gmane.org>
2015-01-25 14:11 ` 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=54C97636.4000201@gmx.com \
--to=elseifthen-kk0ffgbhmju@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.