From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Use of strftime in movemail.ec Date: Sat, 05 Mar 2016 21:58:58 +0200 Message-ID: <83r3fowvb1.fsf@gnu.org> References: <83h9glxk60.fsf@gnu.org> <56DB35DB.90005@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1457207958 17773 80.91.229.3 (5 Mar 2016 19:59:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Mar 2016 19:59:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 05 20:59:07 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1acILy-00012s-Rp for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2016 20:59:06 +0100 Original-Received: from localhost ([::1]:47914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acILy-0005wJ-CH for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2016 14:59:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acILt-0005sI-Rn for emacs-devel@gnu.org; Sat, 05 Mar 2016 14:59:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acILq-0001D6-ML for emacs-devel@gnu.org; Sat, 05 Mar 2016 14:59:01 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acILq-0001D1-KL; Sat, 05 Mar 2016 14:58:58 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2219 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1acILp-0001UF-UB; Sat, 05 Mar 2016 14:58:58 -0500 In-reply-to: <56DB35DB.90005@cs.ucla.edu> (message from Paul Eggert on Sat, 5 Mar 2016 11:39:07 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200968 Archived-At: > Cc: emacs-devel@gnu.org > From: Paul Eggert > 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.