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.
This commit is contained in:
parent
703b0d3e6d
commit
732082c095
2 changed files with 10 additions and 0 deletions
|
@ -128,3 +128,6 @@ Daylight Savings Time is ``normal'' in the Southern hemisphere.
|
||||||
These routines are not equipped to handle non-\c
|
These routines are not equipped to handle non-\c
|
||||||
.SM ASCII
|
.SM ASCII
|
||||||
text, and are provincial anyway.
|
text, and are provincial anyway.
|
||||||
|
.br
|
||||||
|
These routines may garble the date when passed a date parsed with
|
||||||
|
.IR tmparse (2).
|
||||||
|
|
|
@ -275,6 +275,13 @@ Checking the timezone name against the local timezone is a
|
||||||
dirty hack. The same date string may parse differently for
|
dirty hack. The same date string may parse differently for
|
||||||
people in different timezones.
|
people in different timezones.
|
||||||
.PP
|
.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.
|
The timezone information that we ship is out of date.
|
||||||
.PP
|
.PP
|
||||||
The Plan 9 timezone format has no way to express leap seconds.
|
The Plan 9 timezone format has no way to express leap seconds.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue