strftime for innfeed
Alexander Bartolich
alexander.bartolich at gmx.at
Sun Dec 21 21:18:17 UTC 2008
Julien ÉLIE wrote:
> [...]
>> --- innfeed/endpoint.c (revision 8218)
>> +++ innfeed/endpoint.c (working copy)
>
> At line 1631, there is still:
>
> t = theTime() ;
> d_printf (1,"Time now is %s",ctime(&t)) ;
>
> Shouldn't it be switched to strftime too?
This code is guarded by "#if defined (WANT_MAIN)" and does not compile.
It probably serves archaeological purpose so I left it unmodified.
>> +.B log-time-format
>> +This key requires a format string suitable for strftime(3). It is
>> used for
>> +messages sent via syslog(3) and to the \fBstatus-file\fP.
>
> Also to syslog?
For example function delConnection of connection.c:
timeToString (now, dateString, sizeof(dateString)) ;
notice ("ME finishing at %s\n", dateString) ;
> Then it is what is written for instance in news.notice but
> it does not follow the specified format, does it? (hard-coded "%b %d
> %H:%M:%S"
> without the leading day name and the trailing year in innfeed/misc.c?)
d_printf previously processed the output of ctime. I don't know what
it's good for, but the same effect can be more easily had with strftime.
Ciao
Alexander.
More information about the inn-workers
mailing list