bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash 4.2 printf %()T seems to ignore TZ


From: Andreas Schwab
Subject: Re: Bash 4.2 printf %()T seems to ignore TZ
Date: Wed, 16 Feb 2011 19:18:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.94 (gnu/linux)

Dennis Williamson <dennistwilliamson@gmail.com> writes:

> When I ran make test I noticed a discrepancy in a couple of the times
> output during the printf tests. I pulled out the relevant section and
> this is what I get:
>
> LC_ALL=C
> LANG=C
> SECS=1275250155
> export TZ=EST5EDT
> printf "%()T\n" $SECS
> printf "%(%e-%b-%Y %T %Z)T\n" $SECS  # added %Z
>
> result:
>
> 15:09:15
> 30-May-2010 15:09:15 CDT
>
> printf.right says it should be "16:09:15" in both cases. Note that the
> %Z I added outputs CDT.

bash fails to put TZ in its own environment where tzset can find it.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]