mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
tmdata: prioritise "UTC" over "GMT"
"UTC" is the modern name for what used to be "GMT", but ksh still preferred GMT. On systems configured to use the UTC time zone, this caused a 'printf %T' regression test failure in tests/builtins.sh as the external 'data' utility will prefer UTC these days. src/lib/libast/tm/tmdata.c: - Reorder the name alternatives for UTC/GMT so that UTC is the first preference. src/cmd/ksh93/tests/builtins.sh: - Report expected and actual values on 'printf %T' failure. Related: #6
This commit is contained in:
parent
f811482350
commit
c9634e908d
2 changed files with 7 additions and 6 deletions
|
@ -310,9 +310,10 @@ then err_exit "printf '%..*s' not working"
|
|||
fi
|
||||
[[ $(printf '%q\n') == '' ]] || err_exit 'printf "%q" with missing arguments'
|
||||
# we won't get hit by the one second boundary twice, right?
|
||||
[[ $(LC_ALL=C printf '%T\n' now) == "$(LC_ALL=C date)" ]] ||
|
||||
[[ $(LC_ALL=C printf '%T\n' now) == "$(LC_ALL=C date)" ]] ||
|
||||
err_exit 'printf "%T" now'
|
||||
expect= actual=
|
||||
{ expect=$(LC_ALL=C date) && actual=$(LC_ALL=C printf '%T\n' now) && [[ $actual == "$expect" ]]; } ||
|
||||
{ expect=$(LC_ALL=C date) && actual=$(LC_ALL=C printf '%T\n' now) && [[ $actual == "$expect" ]]; } ||
|
||||
err_exit 'printf "%T" now' "(expected $(printf %q "$expect"), got $(printf %q "$actual"))"
|
||||
behead()
|
||||
{
|
||||
read line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue