[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of strftime in movemail.ec
From: |
Eli Zaretskii |
Subject: |
Re: Use of strftime in movemail.ec |
Date: |
Sat, 05 Mar 2016 21:58:58 +0200 |
> Cc: address@hidden
> From: Paul Eggert <address@hidden>
> Date: Sat, 5 Mar 2016 11:39:07 -0800
>
> Eli Zaretskii wrote:
> > I believe these format specifiers were used under the assumption that
> > Gnulib's strftime will be used on systems that don't support the full
> > functionality.
>
> No, I merely assumed C99, which specifies the %e and %T format specifiers for
> strftime. I didn't know Microsoft lacks support for this. I didn't think
> Gnulib
> would be needed.
I see.
> Using %d instead of %e changes the output format of movemail slightly, by
> using
> leading 0 rather than leading space for day of month. It's more conservative
> to
> stick with the same format, so I installed a further patch to try to do that.
> I
> can't easily test this further patch on Windows, but it clearly restores the
> old
> behavior elsewhere because now all the changes are inside "#ifdef WINDOWSNT".
This change causes us have 2 slightly different format specifiers,
which subtly depend on each other for correct operation. Wouldn't it
be better to pass the format string to movemail_strftime, and replace
%e and %T there? Or maybe use %H:%M:%S instead of %T (it's just a
shorthand, right?)? I'm a little bit nervous about having the format
duplicated.
> Using Gnulib would be another possibility, but would be more intrusive for
> other
> reasons (we'd have to supply replacement implementations of emacs_getenv_TZ
> and
> emacs_setenv_TZ on all platforms), and I'd rather not do that so close to a
> release.
I agree.
Thanks.