Re: %z and %Z in strftime man page require clarification

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

 



That patch looks complex and rather than go into its nooks and crannies, how about something much simpler, like the attached? This would be better for the typical reader of the strftime man page.

Although tm_zone and tm_gmtoff are not 100% portable to oddball platforms like MS-Windows, they'll be in the next POSIX and if that portability issue is to be documented at all any longwinded discussion should go in tm.3type not here.
From 4b2ffe84d5abc5b11323657fdfb812c7269ce2d3 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Fri, 24 Feb 2023 17:02:37 -0800
Subject: [PATCH] strftime.3: document how %z and %Z are calculated

---
 man3/strftime.3 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/man3/strftime.3 b/man3/strftime.3
index 57b2a38aa..90248d0b4 100644
--- a/man3/strftime.3
+++ b/man3/strftime.3
@@ -417,6 +417,8 @@ The
 or
 .I \-hhmm
 numeric timezone (that is, the hour and minute offset from UTC). (SU)
+(Calculated from
+.IR tm_gmtoff .)
 .TP
 .B %Z
 The timezone name or abbreviation.
@@ -427,6 +429,8 @@ The timezone name or abbreviation.
 The date and time in
 .BR date (1)
 format. (TZ)
+(Calculated from
+.IR tm_zone .)
 (Not supported in glibc2.)
 .TP
 .B %%
-- 
2.37.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