From: Assaf Gordon <assafgordon@gmail.com>
To: J William Piggott <elseifthen@gmx.com>
Cc: Karel Zak <kzak@redhat.com>, util-linux@vger.kernel.org
Subject: Re: [PATCH 3/3] hwclock: use gnulib's parse_datetime2 function
Date: Fri, 10 Feb 2017 21:38:00 +0000 [thread overview]
Message-ID: <20170210213759.GD24787@gmail.com> (raw)
In-Reply-To: <621b8782-5b62-d07c-c81f-3cfcfbeef8ae@gmx.com>
Hello William,
two minor suggestions:
On Fri, Feb 10, 2017 at 04:08:20PM -0500, J William Piggott wrote:
>+ if (parse_datetime2 (&when, ctl.date_opt, NULL, ctl.debug))
1.
The 'flags' parameter in parse_datetime2 should be
considered as a bit-field, not a boolean.
It's true that in parse-datetime.h [1] the only
existing flag is the debug flag with a value of one,
but we made it so that other future flags are also possible
[2]. I believe 'ctl.debug' is treated like a boolean.
[1]
http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/parse-datetime.h
[2]
https://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00024.html
BTW,
Turning on the debug flag for parse_datetime2 will emit
the parsing steps to STDERR, which will look like so:
https://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00019.html
(might be good for util-linux, or might be an overkill).
2.
The latest version of 'parse_datetime2' function takes 6 parameters,
not just 4. The extra 2 are timezone specific values.
Added here:
http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib?id=4e6e16b3f43ce
regards,
- assaf
next prev parent reply other threads:[~2017-02-10 21:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 20:58 [PATCH 0/3] hwclock: remove date(1) J William Piggott
2017-02-10 21:03 ` [PATCH 1/3] gnulib: add source for gnulib parse-datetime mod J William Piggott
2017-02-10 21:05 ` [PATCH 2/3] build-sys: configure gnulib parse-datetime module J William Piggott
2017-02-10 21:08 ` [PATCH 3/3] hwclock: use gnulib's parse_datetime2 function J William Piggott
2017-02-10 21:38 ` Assaf Gordon [this message]
2017-02-11 16:49 ` J William Piggott
2017-02-11 11:24 ` [PATCH 0/3] hwclock: remove date(1) Sami Kerola
2017-02-11 16:49 ` J William Piggott
2017-02-13 13:04 ` Karel Zak
2017-02-13 14:42 ` J William Piggott
2017-02-14 16:29 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170210213759.GD24787@gmail.com \
--to=assafgordon@gmail.com \
--cc=elseifthen@gmx.com \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.