tech-userlevel archive

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

Re: strftime(3) oddities with %s, %z



>> There is nothing in the C99 description of mktime (or POSIX either)
>> that specifies which fields [strftime] uses,

Unless it was removed after the very-late-draft I have, there is.  See
my earlier mail in this thread which quoted 7.23.3.5.  This says,
among other things,

                                                                The
       appropriate characters  are  determined  using  the  LC_TIME
       category  of the current locale and by the values of zero or
       more members of the broken-down time structure pointed to by
       timeptr,  as  specified  in brackets in the description.

and most[$] conversion has field names specified, such as

       %B  is replaced by the locale's full month name.  [tm_mon]

[$] A few have neither field names nor brackets, such as %n ("is
replaced by a new-line character").  Personally I would have preferred
to have an empty pair of brackets there, but oh well.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index