[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: suggested feautre: "date --debug" - print date parsing diagnostics
From: |
Pádraig Brady |
Subject: |
Re: suggested feautre: "date --debug" - print date parsing diagnostics |
Date: |
Thu, 11 Feb 2016 20:30:04 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/02/16 18:43, Assaf Gordon wrote:
> Hello,
>
> Attached updated patch with fixes and gettext support.
>
> An example:
>
> $ TZ=America/Belize ./src/date --debug \
> -d 'TZ="Asia/Tokyo" Sun, 90-12-11 + 3 days - 90 minutes'
> date: parsed day part: Sun (day ordinal=0 number=0)
> date: parsed date part: (Y-M-D) 0090-12-11
> date: parsed relative part: +3 day(s)
> date: parsed relative part: +3 day(s) -90 minutes
> date: input timezone: +09:00 (set from TZ="Asia/Tokyo" in date string)
> date: warning: adjusting year value 90 to 1990
> date: warning: using midnight as starting time: 00:00:00
> date: warning: day (Sun) ignored when explicit dates are given
> date: starting date/time: '(Y-M-D) 1990-12-11 00:00:00 TZ=+09:00'
> date: warning: when adding relative days, it is recommended to specify
> 12:00pm
> date: after date adjustment (+0 years, +0 months, +3 days),
> date: new date/time = '(Y-M-D) 1990-12-14 00:00:00 TZ=+09:00'
> date: '(Y-M-D) 1990-12-14 00:00:00 TZ=+09:00' = 661100400 epoch-seconds
> date: after time adjustment (+0 hours, -90 minutes, +0 seconds, +0 ns),
> date: new time = 661095000 epoch-seconds
> date: output timezone: -06:00 (set from TZ="America/Belize" environment
> value)
> date: final: 661095000.000000000 (epoch-seconds)
> date: final: (Y-M-D) 1990-12-13 13:30:00 (UTC0)
> date: final: (Y-M-D) 1990-12-13 07:30:00 (output timezone TZ=-06:00)
> Thu Dec 13 07:30:00 CST 1990
+1 if you add at least the above as a test ;)
thanks!
Pádraig.