[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: date(1) treats TZ '' differently from unset
From: |
Paul Eggert |
Subject: |
Re: date(1) treats TZ '' differently from unset |
Date: |
10 Aug 2003 10:33:30 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Ed Avis <address@hidden> writes:
> On a system where local time is +0100:
>
> % (unset TZ; date +%z)
> +0100
> % (TZ= date +%z)
> +0000
>
> Are you sure this is correct?
This is a C library issue, not a coreutils issue, since coreutils
simply repeats what the C library tells it.
In many C libraries, TZ='' is equivalent to TZ='GMT0' or TZ='UTC0',
and that's the behavior you're observing. An unset TZ is equivalent
to a system-supplied default, typically the local time where the host
is physically located.