ref: d9c87a1948467aa2d9ee39218bdc7069feebc35b
parent: d277be6a9ad9bff40436db2244de5bc8524ed08a
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Sep 10 12:26:42 EDT 2020
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.
--- a/sys/man/2/ctime
+++ b/sys/man/2/ctime
@@ -128,3 +128,6 @@
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).
--- a/sys/man/2/tmdate
+++ b/sys/man/2/tmdate
@@ -275,6 +275,13 @@
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.
--
⑨