format date - atq

General support questions
Post Reply
jpa
Posts: 7
Joined: 2020/09/07 09:29:35

format date - atq

Post by jpa » 2021/01/12 07:56:31

Hi,
recently Ive noticed that atq output differs on centos 5,6,7 ... Can I somehow edit the displayed date when running atq?
I need to set the same format as on centos 6.

centos 6

760580 2021-01-12 18:00 t ......
760891 2021-01-13 03:20 z .......
761063 2021-01-12 08:56 p .......
761069 2021-01-12 08:49 q ........

centos 7

73149 Tue Jan 12 08:51:00 2021 p ....
73150 Tue Jan 12 08:51:00 2021 q ....
71769 Tue Jan 12 18:00:00 2021 t ......
71770 Tue Jan 12 18:00:00 2021 t .....

sml
Posts: 157
Joined: 2020/01/17 09:01:44

Re: format date - atq

Post by sml » 2021/01/12 14:45:00

What is locale date_fmt output on each system?

jpa
Posts: 7
Joined: 2020/09/07 09:29:35

Re: format date - atq

Post by jpa » 2021/01/13 08:58:56

Hi,
This is what I got on centos 6
[root@energis ~]# locale date_fmt
%a %b %e %H:%M:%S %Z %Y
[root@energis ~]#

this is centos 7
[root@ferda2 ~]# locale date_fmt
%a %b %e %H:%M:%S %Z %Y
[root@ferda2 ~]#

sml
Posts: 157
Joined: 2020/01/17 09:01:44

Re: format date - atq

Post by sml » 2021/01/13 11:26:26

Looks like at 3.1.10 was patched in Fedora 12/RHEL 6, but that patch was dropped in Fedora 13 when at was upgraded to 3.1.12, and upstream changed to Debian. See also RHBZ#43652. The corresponding Debian bug #612071 was never acted upon. In comments, it includes a SUSE patch that adds to atq an option -o timeformat. I would expect the patch version from the Debian bug apply cleanly to at source in CentOS7.

The at man page, even on CentOS6, states though:
Times displayed will be in the format "Thu Feb 20 14:50:00 1997"

Post Reply

Return to “CentOS 7 - General Support”