Bug 448657 - tzset(3) manpage and tzdata/Theory do not accurately document the use of TZ environment variable
Summary: tzset(3) manpage and tzdata/Theory do not accurately document the use of TZ e...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: man-pages
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-28 03:56 UTC by Wayne Pollock
Modified: 2008-12-12 09:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-12 09:33:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Wayne Pollock 2008-05-28 03:56:53 UTC
Description of problem:

man 3 tzset as well as /usr/share/doc/tzdata-2008b/Theory describe
the format of legal TZ values as:

    std offset dst [offset],start[/time],end[/time]

However that's not how it has works for as long as I can remember
(at least Red Hat 7.1).  The correct (and POSIX compliant) syntax is:

    std offset [dst [offset][,start[/time],end[/time]]]
(with no spaces).

That is:  TZ=EST5EDT works correctly as per POSIX but according to the current
documentation it should not, and should show UTC time instead.

Version-Release number of selected component (if applicable):
man-pages-2.44-1.fc7
tzdata-2008b-1.fc7
glibc-2.6-4 (No problem with this, but it is where I think tzset(3) is defined.)

How reproducible:  Always


Steps to Reproduce:
1.  man tzset
2.  less /usr/share/doc/tzdate*/Theory
3. unset TZ; date; TZ=EST5EDT date
  
Actual results:
(... man page output omitted...)
$ unset TZ
$ date
Tue May 27 23:48:31 EDT 2008
$ TZ=EST5EDT date
Tue May 27 23:48:46 EDT 2008
$ TZ=la-dee-da date
Wed May 28 03:49:28  2008

Expected results:
$ unset TZ
$ date
Tue May 27 23:48:31 EDT 2008
$ TZ=EST5EDT date
Wed May 28 03:48:46  2008
$ TZ=la-dee-da date
Wed May 28 03:49:28  2008


Additional info:

The current POSIX standard requires TZ to allow quoting of ``std'' and
``dst'' values using less-than and greater-than, as follows:

  $ TZ='<EST>5<EDT>' date
  Tue May 27 23:48:31 EDT 2008

However it produces:
  Tue May 27 23:48:31 <EDT> 2008

While fixing that is probably a different bug, the man page should describe the
current usage with a note about the POSIX violation (maybe under the "bugs"
section?)

URL to SUSv3/POSIX standard for TZ environment variable:
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html

Comment 1 Bug Zapper 2008-11-26 10:46:59 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Wayne Pollock 2008-12-05 02:15:52 UTC
I have confirmed this bug in fedora 9.  Will test against F10 ASAP.  Note this should be a simple, quick documentation fix.

Comment 3 Petr Machata 2008-12-08 12:06:47 UTC
tzdata portion seems to be fixed (not sure when the fix got in):
$ grep stdoffset /usr/share/doc/tzdata-2008i/Theory
		stdoffset[dst[offset],date[/time],date[/time]]

I also looked at the man page, and there they actually describe two formats.  First which is only formed by "std offset", and the other that also includes (now mandatory, since it's actually a different format) dst[offset] etc.  So that seems to be fixed, too.  But I'm reassigning to man page maintainer anyway.

Comment 4 Ivana Varekova 2008-12-12 09:33:04 UTC
man page is ok now. I'm closing this bug.


Note You need to log in before you can comment on or make changes to this bug.