diff --git a/src/cmd/ksh93/tests/builtins.sh b/src/cmd/ksh93/tests/builtins.sh index 17230d1ad..c1bc4a435 100755 --- a/src/cmd/ksh93/tests/builtins.sh +++ b/src/cmd/ksh93/tests/builtins.sh @@ -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 diff --git a/src/lib/libast/tm/tmdata.c b/src/lib/libast/tm/tmdata.c index 4ffd2453d..33e3beca8 100644 --- a/src/lib/libast/tm/tmdata.c +++ b/src/lib/libast/tm/tmdata.c @@ -54,7 +54,7 @@ static char* format[] = "AM", "PM", - "GMT", "UTC", "UCT", "CUT", + "UTC", "UCT", "CUT", "GMT", "DST", "", "", "", @@ -233,10 +233,10 @@ static Tm_leap_t leap[] = static Tm_zone_t zone[] = { - 0, "GMT", 0, ( 0 * 60), 0, /* UTC */ - 0, "UCT", 0, ( 0 * 60), 0, /* UTC */ 0, "UTC", 0, ( 0 * 60), 0, /* UTC */ + 0, "UCT", 0, ( 0 * 60), 0, /* UTC */ 0, "CUT", 0, ( 0 * 60), 0, /* UTC */ + 0, "GMT", 0, ( 0 * 60), 0, /* UTC */ 0, "Z", 0, ( 0 * 60), 0, /* UTC */ "USA", "HST", 0, (10 * 60), 0, /* Hawaii */ 0, "YST", "YDT", ( 9 * 60), TM_DST, /* Yukon */