Bug 486227

Summary: "at" man page does not say that hyphenated dates are accepted
Product: [Fedora] Fedora Reporter: Steve Tyler <stephent98>
Component: atAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 10CC: mmaslano
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-19 07:54:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Tyler 2009-02-18 22:28:30 UTC
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 07:54:34 UTC
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 15:00:32 UTC
(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