1 Return-Path: <sojkam1@fel.cvut.cz>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 042A6431FB6
\r
6 for <notmuch@notmuchmail.org>; Thu, 4 Oct 2012 04:02:37 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id XENmEFL1s2C1 for <notmuch@notmuchmail.org>;
\r
16 Thu, 4 Oct 2012 04:02:36 -0700 (PDT)
\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 63D88431FAE
\r
19 for <notmuch@notmuchmail.org>; Thu, 4 Oct 2012 04:02:36 -0700 (PDT)
\r
20 Received: from localhost (unknown [192.168.200.4])
\r
21 by max.feld.cvut.cz (Postfix) with ESMTP id 3A26019F3353;
\r
22 Thu, 4 Oct 2012 13:02:35 +0200 (CEST)
\r
23 X-Virus-Scanned: IMAP AMAVIS
\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])
\r
25 by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,
\r
27 with ESMTP id TGOyvJK8Uy28; Thu, 4 Oct 2012 13:02:30 +0200 (CEST)
\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])
\r
29 by max.feld.cvut.cz (Postfix) with ESMTP id 608EB19F335E;
\r
30 Thu, 4 Oct 2012 13:02:29 +0200 (CEST)
\r
31 Received: from steelpick.2x.cz (rtime.felk.cvut.cz [147.32.86.92])
\r
32 (Authenticated sender: sojkam1)
\r
33 by imap.feld.cvut.cz (Postfix) with ESMTPSA id DAFC4660969;
\r
34 Thu, 4 Oct 2012 13:02:28 +0200 (CEST)
\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.80)
\r
36 (envelope-from <sojkam1@fel.cvut.cz>)
\r
37 id 1TJjCG-0004BK-Cf; Thu, 04 Oct 2012 13:02:28 +0200
\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>
\r
39 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org,
\r
40 David Bremner <david@tethera.net>
\r
41 Subject: Re: [PATCH] test: Improve tests for the date/time parser module
\r
42 In-Reply-To: <87lifn47qn.fsf@nikula.org>
\r
43 References: <cover.1347484177.git.jani@nikula.org>
\r
44 <24186aafbdcb967b8f66c2390c928f3788ab6cbf.1347484177.git.jani@nikula.org>
\r
45 <87zk4e1f5k.fsf@steelpick.2x.cz> <87lifn47qn.fsf@nikula.org>
\r
46 User-Agent: Notmuch/0.14+23~g9d68aca (http://notmuchmail.org) Emacs/24.2.1
\r
47 (x86_64-pc-linux-gnu)
\r
48 Date: Thu, 04 Oct 2012 13:02:28 +0200
\r
49 Message-ID: <87obkifqkb.fsf@steelpick.2x.cz>
\r
51 Content-Type: text/plain
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Thu, 04 Oct 2012 11:02:37 -0000
\r
66 On Wed, Oct 03 2012, Jani Nikula wrote:
\r
67 > On Tue, 25 Sep 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
\r
68 >> This patch reworks date/time parser library test program to make it
\r
69 >> easier to to write the actual tests. It also modifies the notmuch test
\r
70 >> script and adds several new tests to it.
\r
76 >> - /* specify now in seconds since epoch */
\r
77 >> - now = (time_t) strtol (optarg, NULL, 10);
\r
78 >> + memset (&tm, 0, sizeof (tm));
\r
79 >> + char *parsed = strptime (optarg, format, &tm);
\r
81 > One of the problems with strptime is that it doesn't support time zones,
\r
82 > which is why I chose not to use it here. (You can specify %z in the
\r
83 > format to ignore it, but it looks like it's ignored no matter
\r
84 > what. *shrug*) Combined with mktime below, you introduce possible TZ and
\r
85 > DST variations in the tests, which can be problematic. So perhaps we
\r
86 > should keep the reference time as a timestamp here.
\r
88 I didn't pay much attention to time zone issues when writing this little
\r
89 program, so you might be true. But note that test-lib.sh sets TZ=UTC and
\r
90 I hope that this should eliminate the problems. I think that it is
\r
91 better to have human understandable values in test scripts.
\r