[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unexpected behavior with TZ
From: |
gmail |
Subject: |
Unexpected behavior with TZ |
Date: |
Wed, 06 Apr 2011 00:00:41 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
Hello,
While looking after the multibyte test, i notice a behavior with
printf3.sub that surprises me.
The following screen caps are a good resume :
[user@pompomgalli] $ cd bash-4.2_build
[user@pompomgalli] $ ./bash
[user@pompomgalli] $ echo $TZ
Europe/Paris
[user@pompomgalli] $ echo $LC_ALL
C
[user@pompomgalli] $ echo $LANG
fr_FR
[user@pompomgalli] $ date
Tue Apr 5 22:04:38 CEST 2011
[user@pompomgalli] $ TZ=EST5EDT
[user@pompomgalli] $ export TZ
[user@pompomgalli] $ LC_ALL=C
[user@pompomgalli] $ export LC_ALL
[user@pompomgalli] $ LANG=C
[user@pompomgalli] $ export LANG
[user@pompomgalli] $ printf "%-40.50(%a %b %e %H:%M:%S %Z %Y)T
date-style time\n" 1275250155
Sun May 30 22:09:15 CEST 2010 date-style time
[user@pompomgalli] $ date
Tue Apr 5 16:05:32 EDT 2011
[user@pompomgalli] $ printf "%-40.50(%a %b %e %H:%M:%S %Z %Y)T
date-style time\n" 1275250155
Sun May 30 16:09:15 EDT 2010 date-style time
I see in the CHANGES that bash is able to detect TZ change and call
tzset() if available,
i then check the build's config.log :
[root@pompomgalli] # grep -i tz config.log
configure:13502: checking for tzset
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
| #define HAVE_TZSET 1
ac_cv_func_tzset=yes
#define HAVE_TZSET 1
I have probably misunderstood something, or perhaps something is wrong
with my build environment or there could be a side effect when building
in a chrooted jail.
Or perhaps it is an expected behavior with Linux/Glibc arch ? (in all
this cases, sorry for the disturbance)
Another point, i see that the tests/intl2.sub make a direct call to a
"/usr/bin/printf" command.
The intent was to see if and how bash differs from the system printf
binary (not necessarily coreutils) when changing the locale for the
duration of the command. Bash versions before bash-4.2 had a problem
with assignments to LANG preceding builtins. The old versions didn't
temporarily change the locale, though they performed the variable
assignment.
Chet
Not necessarily coreutils, right ^^.
Regards, Cédric.
- Potential bug in library search for libiconv in static build, gmail, 2011/04/03
- Re: Potential bug in library search for libiconv in static build, Chet Ramey, 2011/04/04
- Re: Potential bug in library search for libiconv in static build, gmail, 2011/04/04
- Re: Potential bug in library search for libiconv in static build, gmail, 2011/04/05
- Re: Potential bug in library search for libiconv in static build, Chet Ramey, 2011/04/05
- Unexpected behavior with TZ,
gmail <=
- Re: Unexpected behavior with TZ, Chet Ramey, 2011/04/06
- Re: Unexpected behavior with TZ, gmail, 2011/04/07
- Re: Unexpected behavior with TZ, Marc Herbert, 2011/04/08
- Re: Unexpected behavior with TZ, Chet Ramey, 2011/04/08