[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53033: date has multiple "first saturday"s?
From: |
Darryl Okahata |
Subject: |
bug#53033: date has multiple "first saturday"s? |
Date: |
Wed, 5 Jan 2022 23:14:43 +0000 |
From coreutils 9.0 (note the difference between the "second" and "third"
saturdays):
$ src/date --debug -d "first saturday"
date: parsed day part: next/first Sat (day ordinal=1 number=6)
date: input timezone: system default
date: warning: using midnight as starting time: 00:00:00
date: new start date: 'next/first Sat' is '(Y-M-D) 2022-01-08 00:00:00'
date: starting date/time: '(Y-M-D) 2022-01-08 00:00:00'
date: '(Y-M-D) 2022-01-08 00:00:00' = 1641628800 epoch-seconds
date: timezone: system default
date: final: 1641628800.000000000 (epoch-seconds)
date: final: (Y-M-D) 2022-01-08 08:00:00 (UTC)
date: final: (Y-M-D) 2022-01-08 00:00:00 (UTC-08)
src/date: output format: ‘%a %b %e %H:%M:%S %Z %Y’
Sat Jan 8 00:00:00 PST 2022
$ src/date --debug -d "second saturday"
date: parsed relative part: +1 seconds
date: parsed day part: Sat (day ordinal=0 number=6)
date: input timezone: system default
date: warning: using midnight as starting time: 00:00:00
date: new start date: 'Sat' is '(Y-M-D) 2022-01-08 00:00:00'
date: starting date/time: '(Y-M-D) 2022-01-08 00:00:00'
date: '(Y-M-D) 2022-01-08 00:00:00' = 1641628800 epoch-seconds
date: after time adjustment (+0 hours, +0 minutes, +1 seconds, +0 ns),
date: new time = 1641628801 epoch-seconds
date: timezone: system default
date: final: 1641628801.000000000 (epoch-seconds)
date: final: (Y-M-D) 2022-01-08 08:00:01 (UTC)
date: final: (Y-M-D) 2022-01-08 00:00:01 (UTC-08)
src/date: output format: ‘%a %b %e %H:%M:%S %Z %Y’
Sat Jan 8 00:00:01 PST 2022
$ src/date --debug -d "third saturday"
date: parsed day part: third Sat (day ordinal=3 number=6)
date: input timezone: system default
date: warning: using midnight as starting time: 00:00:00
date: new start date: 'third Sat' is '(Y-M-D) 2022-01-22 00:00:00'
date: starting date/time: '(Y-M-D) 2022-01-22 00:00:00'
date: '(Y-M-D) 2022-01-22 00:00:00' = 1642838400 epoch-seconds
date: timezone: system default
date: final: 1642838400.000000000 (epoch-seconds)
date: final: (Y-M-D) 2022-01-22 08:00:00 (UTC)
date: final: (Y-M-D) 2022-01-22 00:00:00 (UTC-08)
src/date: output format: ‘%a %b %e %H:%M:%S %Z %Y’
Sat Jan 22 00:00:00 PST 2022
-- Darryl
-----Original Message-----
From: Andreas Schwab <schwab@linux-m68k.org>
Sent: Wednesday, January 5, 2022 2:10 PM
To: Darryl Okahata via GNU coreutils Bug Reports <bug-coreutils@gnu.org>
Cc: 53033@debbugs.gnu.org; Darryl Okahata <darryl_okahata@keysight.com>
Subject: Re: bug#53033: date has multiple "first saturday"s?
On Jan 05 2022, Darryl Okahata via GNU coreutils Bug Reports wrote:
> $ date -d "first saturday"
> Sat Jan 8 00:00:00 PST 2022
>
> Unless there is some weird definition of "first Saturday", shouldn't
> this be the 1st (New Year's Day)?
Try date --debug.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And
now for something completely different."
- bug#53033: date has multiple "first saturday"s?, Darryl Okahata, 2022/01/05
- bug#53033: date has multiple "first saturday"s?, Andreas Schwab, 2022/01/05
- bug#53033: date has multiple "first saturday"s?,
Darryl Okahata <=
- bug#53033: date has multiple "first saturday"s?, Darryl Okahata, 2022/01/06
- bug#53033: date has multiple "first saturday"s?, Bob Proulx, 2022/01/07
- bug#53033: date has multiple "first saturday"s?, Darryl Okahata, 2022/01/10
- bug#53033: date has multiple "first saturday"s?, Bob Proulx, 2022/01/10
- bug#53033: date has multiple "first saturday"s?, Darryl Okahata, 2022/01/10
- bug#53033: date has multiple "first saturday"s?, Paul Vint, 2022/01/10