This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ssmtp "Date:" oddity


Bradley Holdridge <Bradley.Holdridge@motorola.com> wrote:
> After I upgraded to the latest version of ssmtp (2.60.4-1), the messages
> I sent with it started arriving with dates such as
>
> Thu, d Jan 2004 21:10:32
>
> The day of the month is always "d". 

I've just sent out a request to upload ssmtp-2.60.4-2.  Once it's 
available you'll see the announcement.

Maybe someone can help me understand this.  The problem is in the 
following format string to strftime:

        /* RFC822 format string borrowed from GNU shellutils date.c */
        const char *format = "%a, %_d %b %Y %H:%M:%S %z";

        now = time(NULL);
        date = localtime((const time_t *)&now);
        (void)strftime(d_string, ARPADATE_LENGTH, format, date);

Both %_ and %z become nothing.

Now, is there some system on which strftime will understand this as 
intended, or did the author foolishly fail to test his assumption that 
a format string for the "date" utility would work?

(Luckily he left the old code around as well, so it was easy enough to 
fix.)

Robert


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]