On Tue, Mar 09, 2021 at 11:13:37PM -0700, Bob Proulx wrote: > The time reported by mailq seems confusing. Sometimes it seems to be > reporting in system time and sometimes UTC time?
Set your timezone consistently. When running as a non-root user, setgid programs such as "postqueue" ignore their environment, including TZ. When running as "root" they honour it. # TZ=Australia/Melbourne mailq -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- 6697F12A9D73 1059 Tue Mar 9 15:24:19 ... 8F5AF105455A 1224 Mon Mar 8 11:17:01 ... -- 2 Kbytes in 2 Requests. # TZ=US/Pacific mailq -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- 6697F12A9D73 1059 Mon Mar 8 20:24:19 ... 8F5AF105455A 1224 Sun Mar 7 16:17:01 ... -- 2 Kbytes in 2 Requests. For machine-readable output, try "postqueue -j", which reports dates in epoch time. For example: $ postqueue -j | jq -r '[.queue_id, (.arrival_time | tostring), .sender] | join(" ")' -- Viktor.