#612075 atq date format is not easily sortable

Package:
at
Source:
at
Description:
Delayed job execution and batch processing
Submitter:
Bernard Hatt
Date:
2021-11-29 22:39:03 UTC
Severity:
wishlist
Tags:
#612075#5
Date:
2011-02-05 13:27:07 UTC
From:
To:
atq uses this date format:
 % atq
 8	Sun Mar  6 20:55:00 2011 a bmh
 5	Sun Feb 13 20:55:00 2011 a bmh
 14	Mon Feb  7 18:50:00 2011 a bmh
 4	Sun Feb  6 20:55:00 2011 a bmh
 7	Sun Feb 27 20:55:00 2011 a bmh
 9	Sun Mar 13 20:55:00 2011 a bmh
 6	Sun Feb 20 20:55:00 2011 a bmh

The POSIX date format is very difficult to sort to see the order in which
the jobs will run.

The old format can be sorted by date:
 % atq | sort +1
 4	2011-02-06 20:55:00 a bmh
 14	2011-02-07 18:50:00 a bmh
 5	2011-02-13 20:55:00 a bmh
 6	2011-02-20 20:55:00 a bmh
 7	2011-02-27 20:55:00 a bmh
 8	2011-03-06 20:55:00 a bmh
 9	2011-03-13 20:55:00 a bmh

The simple/ugly fix is to replace the time format at line 94 of at.c
#define TIMEFORMAT_POSIX    "%Y-%m-%d %T"

though a better solution would be to have a command line option for
either the format, or to output in execution time order.

#612075#12
Date:
2014-07-29 07:20:37 UTC
From:
To:
Could be this?
#612075#17
Date:
2021-11-29 22:37:17 UTC
From:
To:
Control: found -1 3.1.23-1.1

It is also rather unreadable. It doesn't even honor the locales.