From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS55 158.130.0.0/16 X-Spam-Status: No, score=-2.6 required=3.0 tests=AWL,BAYES_00, RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_ZBI,RCVD_IN_XBL,SPF_FAIL,SPF_HELO_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from 80x24.org (tor-exit-node.seas.upenn.edu [158.130.0.242]) by dcvr.yhbt.net (Postfix) with ESMTP id E65581FEB3 for ; Sat, 7 Jan 2017 01:45:10 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 7/9] remove incorrect comment about strftime + locales Date: Sat, 7 Jan 2017 01:44:50 +0000 Message-Id: <20170107014452.9657-8-e@80x24.org> In-Reply-To: <20170107014452.9657-1-e@80x24.org> References: <20170107014452.9657-1-e@80x24.org> List-Id: We only need strftime to be locale-independent when generating dates for email and HTTP headers. Purely numeric dates can use strftime for ease-of-readability. --- lib/PublicInbox/SearchMsg.pm | 2 +- lib/PublicInbox/WwwAtomStream.pm | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm index 96406c6..4522eb6 100644 --- a/lib/PublicInbox/SearchMsg.pm +++ b/lib/PublicInbox/SearchMsg.pm @@ -69,7 +69,7 @@ sub subject ($) { __hdr($_[0], 'subject') } sub to ($) { __hdr($_[0], 'to') } sub cc ($) { __hdr($_[0], 'cc') } -# no strftime, that is locale-dependent +# no strftime, that is locale-dependent and not for RFC822 my @DoW = qw(Sun Mon Tue Wed Thu Fri Sat); my @MoY = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm index a6817b3..5a10034 100644 --- a/lib/PublicInbox/WwwAtomStream.pm +++ b/lib/PublicInbox/WwwAtomStream.pm @@ -6,7 +6,6 @@ package PublicInbox::WwwAtomStream; use strict; use warnings; -# FIXME: locale-independence: use POSIX qw(strftime); use Date::Parse qw(strptime); use Digest::SHA qw(sha1_hex); -- EW