Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/time



On Thu, 18 Apr 2019, Paul Goyette wrote:

XXX: To be strictly correct, the tzgetname() call should probably take
a time reference point in order to return the appropriate zone name
for the time given.

Yes, the timezone name should be associated with the specific point in
time.

Of course, the problem is, what specific point in time should be used,
and how is it specified?  There is no argument in which the point in
time could be passed.

For now we should probably add a BUGS section to the man page to make
note of this restriction.

Here's a draft. If there's no objection, I can commit it in a day or two.

Index: tzset.3
===================================================================
RCS file: /cvsroot/src/lib/libc/time/tzset.3,v
retrieving revision 1.39
diff -u -p -r1.39 tzset.3
--- tzset.3     19 Oct 2018 23:05:35 -0000      1.39
+++ tzset.3     18 Apr 2019 02:06:20 -0000
@@ -427,3 +427,10 @@ function conforms to
 .\" @(#)newtzset.3     8.2
 .\" This file is in the public domain, so clarified as of
 .\" 2009-05-17 by Arthur David Olson.
+.Sh BUGS
+The name and GMT offset for a timezone can vary over time.  The
+.Fn tzgetname
+and
+.Fn tzgmtoff
+functions return values are those that apply to the latest point in time
+for which values are available, even if that refers to a future time.



+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost   |
+--------------------+--------------------------+-----------------------+


Home | Main Index | Thread Index | Old Index