diff options
author | Ori Bernstein <ori@eigenstate.org> | 2020-09-10 16:26:42 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2020-09-10 16:26:42 -0700 |
commit | 732082c0951ca080de05608a0b6464ca699da61d (patch) | |
tree | d0dc23ed0611725d917a9e2ab2df465063b34aa5 | |
parent | 703b0d3e6d8d68eb5ca36866386a3d9c47ec2a15 (diff) | |
download | plan9front-732082c0951ca080de05608a0b6464ca699da61d.tar.xz |
ctime(2), tmdate(2): document ctime/tmparse incompatibility
Tmparse and ctime don't mix. The timezone name may be
too long for the number of characters ctime mandates.
Document this footgun.
-rw-r--r-- | sys/man/2/ctime | 3 | ||||
-rw-r--r-- | sys/man/2/tmdate | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/man/2/ctime b/sys/man/2/ctime index 5bb1cefd2..b82dda65b 100644 --- a/sys/man/2/ctime +++ b/sys/man/2/ctime @@ -128,3 +128,6 @@ Daylight Savings Time is ``normal'' in the Southern hemisphere. These routines are not equipped to handle non-\c .SM ASCII text, and are provincial anyway. +.br +These routines may garble the date when passed a date parsed with +.IR tmparse (2). diff --git a/sys/man/2/tmdate b/sys/man/2/tmdate index ca2161795..f412971a8 100644 --- a/sys/man/2/tmdate +++ b/sys/man/2/tmdate @@ -275,6 +275,13 @@ Checking the timezone name against the local timezone is a dirty hack. The same date string may parse differently for people in different timezones. .PP +Tmparse and ctime don't mix. +Tmparse preserves timezone names, including names like '+0200'. +Ctime expects timezone names to be exactly three characters. +Use the +.I %τ +format character instead of ctime. +.PP The timezone information that we ship is out of date. .PP The Plan 9 timezone format has no way to express leap seconds. |