Skip to contentSkip to conversation

tzset.3: Incorrect TZ string representation

PATCH In review J William Piggott 2 participants 6 messages Feb 1, 2015 3 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 tzset.3: Incorrect TZ string representation

The TZ string representation indicates that the start/end rules are required; this is incorrect.

Updated the TZ string format to the POSIX specification and improve its readability by having only the optional parts in italics.

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

---
 man3/tzset.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man3/tzset.3 +1 -1
index 9cb9d32..ed7f406 100644
@@ -113,7 +113,7 @@ The hour must be between 0 and 24, and the minutes and seconds
 The second format is used when there is daylight saving time:
 .sp
 .RS
-.I std offset dst [offset],start[/time],end[/time]
+.RI stdoffset[ dst [ offset ][, start [ /time ], end [ /time ]]]
 .RE
 .sp
 There are no spaces in the specification.

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 2/3 tzset.3: There are only two TZ formats

tzset(3) currently states that there are three TZ formats. The first two it lists are actually variations of the POSIX-style TZ format, of which there are at least five variations.

This patch corrects this to match the POSIX specification of TZ having only two formats.

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

---
 man3/tzset.3 | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)
man3/tzset.3 +6 -15
index ed7f406..8002ee5 100644
@@ -90,12 +90,12 @@ below, Coordinated Universal Time (UTC) is used.
 .PP
 The value of
 .B TZ
-can be one of three formats.
-The first format is used
-when there is no daylight saving time in the local timezone:
+can be one of two formats.
+The first format is a string of characters that directly represent the
+timezone to be used:
 .sp
 .RS
-.I std offset
+.RI stdoffset[ dst [ offset ][, start [ /time ], end [ /time ]]]
 .RE
 .sp
 There are no spaces in the specification.
@@ -110,15 +110,6 @@ east.
 The hour must be between 0 and 24, and the minutes and seconds
 0 and 59.
 .PP
-The second format is used when there is daylight saving time:
-.sp
-.RS
-.RI stdoffset[ dst [ offset ][, start [ /time ], end [ /time ]]]
-.RE
-.sp
-There are no spaces in the specification.
-The initial \fIstd\fP and
-\fIoffset\fP specify the standard timezone, as described above.
 The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
 corresponding daylight saving timezone.
 If the offset is omitted,
@@ -161,7 +152,7 @@ and the changeovers happen at the default time of 02:00:00:
     TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"
 .fi
 .PP
-The third format specifies that the timezone information should be read
+The second format specifies that the timezone information should be read
 from a file:
 .sp
 .RS
@@ -175,7 +166,7 @@ If \fIfilespec\fP is given, it specifies another
 file to read the timezone information from.
 If \fIfilespec\fP does not begin with a \(aq/\(aq, the file specification is
 relative to the system timezone directory.  If the colon is omitted each
-of the above three \fBTZ\fP formats will be tried in order.
+of the above \fBTZ\fP formats will be tried.
 .PP
 Here's an example, once more for New Zealand:
 .nf

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [PATCH 2/3] tzset.3: There are only two TZ formats

Quoted 7 lines · J William Piggott

tzset(3) currently states that there are three TZ formats. The first two it lists are actually variations of the POSIX-style TZ format, of which there are at least five variations.

This patch corrects this to match the POSIX specification of TZ having only two formats.

Thanks, William. Applied.

Cheers,

Michael

Quoted 63 lines

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

---
 man3/tzset.3 | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)
man3/tzset.3 +6 -15
index ed7f406..8002ee5 100644
@@ -90,12 +90,12 @@ below, Coordinated Universal Time (UTC) is used.
 .PP
 The value of
 .B TZ
-can be one of three formats.
-The first format is used
-when there is no daylight saving time in the local timezone:
+can be one of two formats.
+The first format is a string of characters that directly represent the
+timezone to be used:
 .sp
 .RS
-.I std offset
+.RI stdoffset[ dst [ offset ][, start [ /time ], end [ /time ]]]
 .RE
 .sp
 There are no spaces in the specification.
@@ -110,15 +110,6 @@ east.
 The hour must be between 0 and 24, and the minutes and seconds
 0 and 59.
 .PP
-The second format is used when there is daylight saving time:
-.sp
-.RS
-.RI stdoffset[ dst [ offset ][, start [ /time ], end [ /time ]]]
-.RE
-.sp
-There are no spaces in the specification.
-The initial \fIstd\fP and
-\fIoffset\fP specify the standard timezone, as described above.
 The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
 corresponding daylight saving timezone.
 If the offset is omitted,
@@ -161,7 +152,7 @@ and the changeovers happen at the default time of 02:00:00:
     TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"
 .fi
 .PP
-The third format specifies that the timezone information should be read
+The second format specifies that the timezone information should be read
 from a file:
 .sp
 .RS
@@ -175,7 +166,7 @@ If \fIfilespec\fP is given, it specifies another
 file to read the timezone information from.
 If \fIfilespec\fP does not begin with a \(aq/\(aq, the file specification is
 relative to the system timezone directory.  If the colon is omitted each
-of the above three \fBTZ\fP formats will be tried in order.
+of the above \fBTZ\fP formats will be tried.
 .PP
 Here's an example, once more for New Zealand:
 .nf
Signature · 7 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

PATCH 3/3 tzset.3: typos and version bump

In reply to a message not in the archive
---
 man3/tzset.3 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
man3/tzset.3 +4 -4
index 8002ee5..0347ae8 100644
@@ -30,7 +30,7 @@
 .\" Modified 2001-11-13, aeb
 .\" Modified 2004-12-01 mtk and Martin Schulze <[email protected]>
 .\"
-.TH TZSET 3  2014-08-19 "" "Linux Programmer's Manual"
+.TH TZSET 3  2015-01-30 "" "Linux Programmer's Manual"
 .SH NAME
 tzset, tzname, timezone, daylight \- initialize time conversion information
 .SH SYNOPSIS
@@ -84,9 +84,9 @@ timezone directory (see the \fBFILES\fP section below).
 .PP
 If the
 .B TZ
-variable does appear in the environment but its value is empty
+variable does appear in the environment, but its value is empty,
 or its value cannot be interpreted using any of the formats specified
-below, Coordinated Universal Time (UTC) is used.
+below, then Coordinated Universal Time (UTC) is used.
 .PP
 The value of
 .B TZ
@@ -113,7 +113,7 @@ The hour must be between 0 and 24, and the minutes and seconds
 The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
 corresponding daylight saving timezone.
 If the offset is omitted,
-it default to one hour ahead of standard time.
+it defaults to one hour ahead of standard time.
 .PP
 The \fIstart\fP field specifies when daylight saving time goes into
 effect and the \fIend\fP field specifies when the change is made back to

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

Re: [PATCH 3/3] tzset.3: typos and version bump

On 02/01/2015 02:18 PM, J William Piggott wrote:

Thanks, William. Applied. Note that there's no need to bump the page timestamp. Nowadays, my release scripts make sure it gets updated.

Cheers,

Michael

Quoted 40 lines
---
 man3/tzset.3 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
man3/tzset.3 +4 -4
index 8002ee5..0347ae8 100644
@@ -30,7 +30,7 @@
 .\" Modified 2001-11-13, aeb
 .\" Modified 2004-12-01 mtk and Martin Schulze <[email protected]>
 .\"
-.TH TZSET 3  2014-08-19 "" "Linux Programmer's Manual"
+.TH TZSET 3  2015-01-30 "" "Linux Programmer's Manual"
 .SH NAME
 tzset, tzname, timezone, daylight \- initialize time conversion information
 .SH SYNOPSIS
@@ -84,9 +84,9 @@ timezone directory (see the \fBFILES\fP section below).
 .PP
 If the
 .B TZ
-variable does appear in the environment but its value is empty
+variable does appear in the environment, but its value is empty,
 or its value cannot be interpreted using any of the formats specified
-below, Coordinated Universal Time (UTC) is used.
+below, then Coordinated Universal Time (UTC) is used.
 .PP
 The value of
 .B TZ
@@ -113,7 +113,7 @@ The hour must be between 0 and 24, and the minutes and seconds
 The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
 corresponding daylight saving timezone.
 If the offset is omitted,
-it default to one hour ahead of standard time.
+it defaults to one hour ahead of standard time.
 .PP
 The \fIstart\fP field specifies when daylight saving time goes into
 effect and the \fIend\fP field specifies when the change is made back to
Signature · 7 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw
In reply to a message not in the archive
Quoted 7 lines · J William Piggott

The TZ string representation indicates that the start/end rules are required; this is incorrect.

Updated the TZ string format to the POSIX specification and improve its readability by having only the optional parts in italics.

Thanks, William. Applied.

Cheers,

Michael

Quoted 21 lines

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

---
 man3/tzset.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man3/tzset.3 +1 -1
index 9cb9d32..ed7f406 100644
@@ -113,7 +113,7 @@ The hour must be between 0 and 24, and the minutes and seconds
 The second format is used when there is daylight saving time:
 .sp
 .RS
-.I std offset dst [offset],start[/time],end[/time]
+.RI stdoffset[ dst [ offset ][, start [ /time ], end [ /time ]]]
 .RE
 .sp
 There are no spaces in the specification.
Signature · 7 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html