Subject: locales
To: None <tech-userlevel@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 02/14/2003 10:22:45
strftime lists %x and %X for formatting dates and times in a
locale-specific manner.
atq uses this. At the moment I'm getting nn/nn/nn style dates, which I
want to change (in my case, to ISO yyyy-mm-dd format).
What do I need to do to do this? As far as I can tell, this is driven
by the _CurrentTimeLocale pointer in libc, but I can't see anywhere in
the code where that is ever set to anything but _DefaultTimeLocale.
Am I just missing something, or is there really no way to do this short
of either writing the missing locale support or hacking on at.c (or
_def_time.c to change _DefaultTimeLocale)?
(It also looks to me as though at.c assumes it knows, to within a tab
stop, how many characters "%X %x" formatted times take up, which
strikes me as a Bad Thing.)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B