Re: Please help me with TZ=aaa24 date +%Y%m%d
- From: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
- Date: 15 Feb 2006 14:26:49 GMT
On 15 Feb 2006 05:12:05 -0800, krish wrote:
Hi,[...]
Can anyone please tell me what 'aaa' in TZ=aaa24 date +%Y%m%d
stands for. I have searched the unix man pages but not able to get its
meaning.
as long as you use the format TZ=<string><offset>
<string> will just be some descriptive text that you chose to
describe that rule. As long as you specify an offset (it could
be even more complicated like having two offsets for day light
saving time, and rules to tell when to switch to DST), then the
<string> is not used to define the rules (aaa will not refer to
any description file in /usr/share/zoneinfo contrary to another
contributor said), it will just be used in date +%Z.
So, TZ=aaa24 is a tab zone called "aaa" that is defined as being
offset by 24 wrt Universal time (GMT, UTC).
If you had specified:
TZ=aaa
so, without any rule embeded in $TZ, then "aaa" would have
refered to a system wide timezone, whose rules are defined in a
system wide description file (on some systems in
/usr/share/zoneinfo).
$ TZ=aaa truss -t open date
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libc.so.1", O_RDONLY) = 3
open("/usr/lib/libdl.so.1", O_RDONLY) = 3
open("/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1", O_RDONLY) = 3
open("/usr/share/lib/zoneinfo/aaa", O_RDONLY) Err#2 ENOENT
open("/usr/share/lib/zoneinfo/aaa", O_RDONLY) Err#2 ENOENT
open("/usr/share/lib/zoneinfo/aaa", O_RDONLY) Err#2 ENOENT
My system doesn't have such system-wide timezone.
$ TZ=Brazil/Acre truss -t open date
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libc.so.1", O_RDONLY) = 3
open("/usr/lib/libdl.so.1", O_RDONLY) = 3
open("/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1", O_RDONLY) = 3
open("/usr/share/lib/zoneinfo/Brazil/Acre", O_RDONLY) = 3
Wed Feb 15 09:24:47 AST 2006
It does have one called Brazil/Acre, but if I decide to specify
the rules for Brazil/Acre to say that it's 24 hours behind UTC:
$ TZ=Brazil/Acre24 truss -t open date
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libc.so.1", O_RDONLY) = 3
open("/usr/lib/libdl.so.1", O_RDONLY) = 3
open("/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1", O_RDONLY) = 3
Tue Feb 14 14:25:41 Brazil/Acre 2006
the system-wide description file is not used.
--
Stephane
.
- Follow-Ups:
- Re: Please help me with TZ=aaa24 date +%Y%m%d
- From: krish
- Re: Please help me with TZ=aaa24 date +%Y%m%d
- References:
- Please help me with TZ=aaa24 date +%Y%m%d
- From: krish
- Please help me with TZ=aaa24 date +%Y%m%d
- Prev by Date: Re: Please help me with TZ=aaa24 date +%Y%m%d
- Next by Date: Re: Script needed ...
- Previous by thread: Re: Please help me with TZ=aaa24 date +%Y%m%d
- Next by thread: Re: Please help me with TZ=aaa24 date +%Y%m%d
- Index(es):
Relevant Pages
|