[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PSPP-BUG: PSPP 1.2.0 - TIME format outputs single hours digit
From: |
Nolan Void |
Subject: |
PSPP-BUG: PSPP 1.2.0 - TIME format outputs single hours digit |
Date: |
Sat, 9 Feb 2019 01:57:24 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
In PSP 1.2.0. Confirmed on Gentoo 4.14.83, Ubuntu Studio 4.4.0-141
low-latency, and FreeBSD 11.2-RELEASE-p8.
Bug description:
The PSPP manual section "6.7.4.5 Time and Date Formats" shows a
template of 'hh:MM:SS.ss' for the TIME format, and later states
that 'hh' should "Output as at least two digits". The example,
'01:31:17.01' shows as much. However, for hours less than 10, PSPP
1.2.0 outputs a single digit.
To reproduce the bug, run the following in a Bourne-derived shell:
echo 'data list /dt 1-10 (sdate) tm 12-19 (time).
begin data.
2013/03/16 10:32:15
2017/12/01 03:38:47
end data.
list.' | pspp
The output (after the usual jazz):
Data List
dt tm
───────────────────
2013/03/16 10:32:15
2017/12/01 3:38:47
Aside from deviating from the manual, this is annoying because it
makes it more difficult to parse the output (for example, to use
AWK to convert to some of the more modern time formats). One can
work around it by using PSPP's date-time functions, but it's a bit
of a wart.
Happy hunting,
Nolan Void
- PSPP-BUG: PSPP 1.2.0 - TIME format outputs single hours digit,
Nolan Void <=