[Top][All Lists]

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

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

From: Greg Wooledge
Subject: Re: Bash 4.2 printf %()T seems to ignore TZ
Date: Wed, 16 Feb 2011 08:22:14 -0500
User-agent: Mutt/

On Tue, Feb 15, 2011 at 09:49:16PM -0600, Dennis Williamson wrote:
> 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

I can't duplicate your problem on HP-UX 10.20:

imadev:~$ s=1275250155; TZ=CST6CDT printf '%(%T %Z)T\n' "$s"
15:09:15 CDT
imadev:~$ s=1275250155; printf '%(%T %Z)T\n' "$s"
16:09:15 EDT

That appears to be the correct result.  Maybe your issue involves
something in libc?

reply via email to

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