The 2004-06-19 fix for who and pinky was incomplete, as ctime
authorJim Meyering <jim@meyering.net>
Tue, 22 Jun 2004 14:56:46 +0000 (14:56 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 22 Jun 2004 14:56:46 +0000 (14:56 +0000)
commitf581b96e7fa8342329a82d0cd88280917d8f701c
tree67cebfb2e32083bb25a85f885f67b1f36ec41f90
parentf1317a406025f5ceaf34709b370a53062f54ee8b
The 2004-06-19 fix for who and pinky was incomplete, as ctime
has undefined behavior if the year precedes -999 or follows 9999.
Since we have to stop using ctime anyway, we might as well use
strftime and fix the FIXME, and support internationalized dates.

Include "hard-locale.h".
(time_format, time_format_width): New vars.
(time_string, print_line): Use them.
(main): Set them.
(time_string): Use localtime + strftime instead of
ctime, to avoid problems with years before -999 or after 9999.
src/who.c