This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 486227 - "at" man page does not say that hyphenated dates are accepted
"at" man page does not say that hyphenated dates are accepted
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: at (Show other bugs)
10
All Linux
low Severity low
: ---
: ---
Assigned To: Marcela Mašláňová
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-18 17:28 EST by Steve Tyler
Modified: 2009-02-19 10:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-19 02:54:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steve Tyler 2009-02-18 17:28:30 EST
Description of problem:

The man page for the "at" command does not mention hyphenated dates: YYYY-MM-DD.

Experiment shows that the at command accepts dates in the form YYYY-MM-DD.
Further, the grammar that comes with the package explicitly mentions hyphenated dates.

Version-Release number of selected component (if applicable):
at-3.1.10-26.fc10.i386

How reproducible:
Easily.

Steps to Reproduce:
1. $ echo 'date' | at 2009-02-18
job 24 at 2009-02-18 14:14

To save typing:
$ echo 'date' | at `date +%F`
job 26 at 2009-02-18 14:19

2. The job is accepted and runs immediately.
(It helps to have mail-notification installed.)

3. man at

Additional info:

The grammar in /usr/share/doc/at-3.1.10/timespec has:

%token  <charval> HYPHENDATE

Unfortunately, it doesn't give the syntax.
Comment 1 Marcela Mašláňová 2009-02-19 02:54:34 EST
I'll change the man page in next release. In man is written "The exact definition of the time specification can be found in /usr/share/doc/at-3.1.10/timespec." which is true, but this is yacc specification, which isn't user friendly.

btw I suggest using "echo date | at now" instead of "echo 'date' | at `date +%F`". That's definitely save typing ;-)
Comment 2 Steve Tyler 2009-02-19 10:00:32 EST
(In reply to comment #1)
> I'll change the man page in next release. In man is written "The exact
> definition of the time specification can be found in
> /usr/share/doc/at-3.1.10/timespec." which is true, but this is yacc
> specification, which isn't user friendly.

Thanks. It seems odd that the package includes the yacc and not the lex, which is also not user friendly.

From the yacc and the lex, it appears that "at" accepts both two and four digit years everywhere -- also not mentioned in the man page.

By experiment, all of these are accepted:
2009-02-19
19.02.2009
02192009

Similarly, day and month numbers can be one or two digits.
2009-3-1
1.3.2009

But not here:
$ echo 'date' | at 312009
Error in month number. Last token seen: 312009
Garbled time

> btw I suggest using "echo date | at now" instead of "echo 'date' | at `date
> +%F`". That's definitely save typing ;-)

That was intended to avoid this:
$ echo 'date' | at 2009-02-18
at: refusing to create job destined in the past

Note You need to log in before you can comment on or make changes to this bug.