[PATCH 03/12] tzset: recommend tm_gmtoff, tm_zone instead

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

 



New section CAVEATS for why time zone state is dicey.
---
 man/man3/tzset.3 | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/man/man3/tzset.3 b/man/man3/tzset.3
index 6e89dd530..552401c58 100644
--- a/man/man3/tzset.3
+++ b/man/man3/tzset.3
@@ -241,6 +241,16 @@ name of the timezone corresponding to its first argument (minutes
 West of UTC).
 If the second argument was 0, the standard name was used,
 otherwise the daylight saving time version.
+.SH CAVEATS
+Because the values of \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP
+are often unspecified, and accessing them can lead to undefined
+behavior in multithreaded applications,
+code should instead obtain time zone offset and abbreviations from the
+.I tm_gmtoff
+and
+.I tm_zone
+members of the broken-down time structure
+.BR tm (3type).
 .SH SEE ALSO
 .BR date (1),
 .BR gettimeofday (2),
-- 
2.45.2





[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux