All of lore.kernel.org
 help / color / mirror / Atom feed
* [V3 PULL] hwclock: remove date(1)
@ 2017-03-04 21:56 J William Piggott
  2017-03-05  1:12 ` Pádraig Brady
  2017-03-14 13:17 ` Karel Zak
  0 siblings, 2 replies; 7+ messages in thread
From: J William Piggott @ 2017-03-04 21:56 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux


Everyone,
 Here's the latest branch for adding parse-date.

Karel,
I have changed a few things since the last working branch I sent you.  I
moved the API from parse-date.h to timeutils.h. Cleaned up the code some
more and made more style conversion. Added documentation and fixed
hwclock.8.in.

I've tested the parser pretty thoroughly now, including using odd input
listed in bug fixes. It passed for all of them.

Here are examples of the problem related to the latest gnulib
parse_datetime() commit; which was actually caused by changes in
coreutils not gnulib.

BROKEN
TZ="Europe/London" date -d 'TZ="Australia/Perth" 2016-08-15 07:00'
Mon Aug 15 07:00:00 AWST 2016

CORRECT
TZ="Europe/London" date -d 'TZ="Australia/Perth" 2016-08-15 07:00'
Mon Aug 15 00:00:00 BST 2016

HWCLOCK CORRECT
TZ="Europe/London" ./hwclock --predict --noadjfile --utc --date 'TZ="Australia/Perth" 2016-08-15 07:00'
2016-08-15 00:00:00.000000+0100

Not that anyone should ever get up to such a thing with hwclock anyway.

 ---

The following changes since commit 1765814521bf2aba7b8c03d3ab2e3b784e1ce2c4:

  libsmartcols: allow to add column to already used table (2017-03-03 10:37:37 +0100)

are available in the git repository at:

  git@github.com:jwpi/util-linux.git hwclock-date7

for you to fetch changes up to b80d6d4be8371b6e8fa4a31a1fc1f7ce57a91be7:

  lib: add parse-date documentation (2017-03-04 15:03:44 -0500)

----------------------------------------------------------------
J William Piggott (3):
      lib: add parse-date.y
      hwclock: use parse_date function
      lib: add parse-date documentation

Karel Zak (1):
      build-sys: add parse-date.y

 .gitignore                   |    1 +
 Documentation/parse-date.txt |  468 ++++++++++++
 autogen.sh                   |   20 +
 configure.ac                 |    2 +-
 include/cctype.h             |  325 +++++++++
 include/timeutils.h          |    2 +
 lib/.gitignore               |    1 +
 lib/Makemodule.am            |    1 +
 lib/parse-date.y             | 1645 ++++++++++++++++++++++++++++++++++++++++++
 sys-utils/hwclock.8.in       |   22 +-
 sys-utils/hwclock.c          |  104 +--
 11 files changed, 2480 insertions(+), 111 deletions(-)
 create mode 100644 Documentation/parse-date.txt
 create mode 100644 include/cctype.h
 create mode 100644 lib/.gitignore
 create mode 100644 lib/parse-date.y

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V3 PULL] hwclock: remove date(1)
  2017-03-04 21:56 [V3 PULL] hwclock: remove date(1) J William Piggott
@ 2017-03-05  1:12 ` Pádraig Brady
  2017-03-05 14:09   ` J William Piggott
  2017-03-14 13:17 ` Karel Zak
  1 sibling, 1 reply; 7+ messages in thread
From: Pádraig Brady @ 2017-03-05  1:12 UTC (permalink / raw)
  To: J William Piggott, Karel Zak; +Cc: util-linux

On 04/03/17 13:56, J William Piggott wrote:
> 
> Everyone,
>  Here's the latest branch for adding parse-date.
> 
> Karel,
> I have changed a few things since the last working branch I sent you.  I
> moved the API from parse-date.h to timeutils.h. Cleaned up the code some
> more and made more style conversion. Added documentation and fixed
> hwclock.8.in.
> 
> I've tested the parser pretty thoroughly now, including using odd input
> listed in bug fixes. It passed for all of them.
> 
> Here are examples of the problem related to the latest gnulib
> parse_datetime() commit; which was actually caused by changes in
> coreutils not gnulib.
> 
> BROKEN
> TZ="Europe/London" date -d 'TZ="Australia/Perth" 2016-08-15 07:00'
> Mon Aug 15 07:00:00 AWST 2016
> 
> CORRECT
> TZ="Europe/London" date -d 'TZ="Australia/Perth" 2016-08-15 07:00'
> Mon Aug 15 00:00:00 BST 2016

Sorry for jumping in here. Are you saying there are issues with
the current code in gnulib?

Note the TZ issue in date(1) was added in coreutils-8.26 with:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.25-15-gdf88fce
That was fixed with a minimal fix in coreutils-8.26 in Fedora.
coreutils-8.27 will be released in a few days with a different fix
that incorporated changes in parse_datetime in gnulib.

thanks,
Pádraig

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V3 PULL] hwclock: remove date(1)
  2017-03-05  1:12 ` Pádraig Brady
@ 2017-03-05 14:09   ` J William Piggott
  0 siblings, 0 replies; 7+ messages in thread
From: J William Piggott @ 2017-03-05 14:09 UTC (permalink / raw)
  To: Pádraig Brady, Karel Zak; +Cc: util-linux


On 03/04/2017 08:12 PM, Pádraig Brady wrote:
> On 04/03/17 13:56, J William Piggott wrote:
>>
>> Everyone,
>>  Here's the latest branch for adding parse-date.
>>
>> Karel,
>> I have changed a few things since the last working branch I sent you.  I
>> moved the API from parse-date.h to timeutils.h. Cleaned up the code some
>> more and made more style conversion. Added documentation and fixed
>> hwclock.8.in.
>>
>> I've tested the parser pretty thoroughly now, including using odd input
>> listed in bug fixes. It passed for all of them.
>>
>> Here are examples of the problem related to the latest gnulib
>> parse_datetime() commit; which was actually caused by changes in
>> coreutils not gnulib.
>>
>> BROKEN
>> TZ="Europe/London" date -d 'TZ="Australia/Perth" 2016-08-15 07:00'
>> Mon Aug 15 07:00:00 AWST 2016
>>
>> CORRECT
>> TZ="Europe/London" date -d 'TZ="Australia/Perth" 2016-08-15 07:00'
>> Mon Aug 15 00:00:00 BST 2016
> 
> Sorry for jumping in here.

Hello Pádraig, no worries.

> Are you saying there are issues with the current code in gnulib?

Nope, I'm saying that the latest gnulib commit regarding
parse_datetime() (gnulib-4e6e16b), which I intentionally omitted from
the version I based this parse_date() submission upon (gnulib-dd7a871),
does not cause this version of parse_date() to be broken. I'm not making a
comment about the state of coreutils nor gnulib, sorry if I implied that
somehow.


> 
> Note the TZ issue in date(1) was added in coreutils-8.26 with:
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.25-15-gdf88fce
> That was fixed with a minimal fix in coreutils-8.26 in Fedora.
> coreutils-8.27 will be released in a few days with a different fix
> that incorporated changes in parse_datetime in gnulib.
> 
> thanks,
> Pádraig
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V3 PULL] hwclock: remove date(1)
  2017-03-04 21:56 [V3 PULL] hwclock: remove date(1) J William Piggott
  2017-03-05  1:12 ` Pádraig Brady
@ 2017-03-14 13:17 ` Karel Zak
  2017-03-23  0:43   ` J William Piggott
  1 sibling, 1 reply; 7+ messages in thread
From: Karel Zak @ 2017-03-14 13:17 UTC (permalink / raw)
  To: J William Piggott; +Cc: util-linux

On Sat, Mar 04, 2017 at 04:56:12PM -0500, J William Piggott wrote:
>  Here's the latest branch for adding parse-date.

Reviewed, it seems ready do merge from my point of view. Objections?

TODO (after merge):
  - add lib/test_parse_date.c
  - add tests/ts/misc/parse_date regression test
  - replace parse_timestamp() with new parse_date() 


    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V3 PULL] hwclock: remove date(1)
  2017-03-14 13:17 ` Karel Zak
@ 2017-03-23  0:43   ` J William Piggott
  2017-03-23 11:41     ` Karel Zak
  0 siblings, 1 reply; 7+ messages in thread
From: J William Piggott @ 2017-03-23  0:43 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

ping

On 03/14/2017 09:17 AM, Karel Zak wrote:
> On Sat, Mar 04, 2017 at 04:56:12PM -0500, J William Piggott wrote:
>>  Here's the latest branch for adding parse-date.
> 
> Reviewed, it seems ready do merge from my point of view. Objections?
> 
> TODO (after merge):
>   - add lib/test_parse_date.c
>   - add tests/ts/misc/parse_date regression test
>   - replace parse_timestamp() with new parse_date() 
> 
> 
>     Karel
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V3 PULL] hwclock: remove date(1)
  2017-03-23  0:43   ` J William Piggott
@ 2017-03-23 11:41     ` Karel Zak
  2017-03-23 14:37       ` J William Piggott
  0 siblings, 1 reply; 7+ messages in thread
From: Karel Zak @ 2017-03-23 11:41 UTC (permalink / raw)
  To: J William Piggott; +Cc: util-linux

On Wed, Mar 22, 2017 at 08:43:05PM -0400, J William Piggott wrote:
> ping

Merged (sorry I has been busy with RHEL). Thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V3 PULL] hwclock: remove date(1)
  2017-03-23 11:41     ` Karel Zak
@ 2017-03-23 14:37       ` J William Piggott
  0 siblings, 0 replies; 7+ messages in thread
From: J William Piggott @ 2017-03-23 14:37 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

On 03/23/2017 07:41 AM, Karel Zak wrote:
> On Wed, Mar 22, 2017 at 08:43:05PM -0400, J William Piggott wrote:
>> ping
> 
> Merged (sorry I has been busy with RHEL). Thanks!

No worries Karel, thank you for fixing the build system for me.

> 
>     Karel
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-03-23 14:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-04 21:56 [V3 PULL] hwclock: remove date(1) J William Piggott
2017-03-05  1:12 ` Pádraig Brady
2017-03-05 14:09   ` J William Piggott
2017-03-14 13:17 ` Karel Zak
2017-03-23  0:43   ` J William Piggott
2017-03-23 11:41     ` Karel Zak
2017-03-23 14:37       ` J William Piggott

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.