Re: Please help me with TZ=aaa24 date +%Y%m%d



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
.



Relevant Pages

  • Re: [patch 1/5] Extended crashkernel command line
    ... "offset" seems to be optional in the new syntax. ... not specify offset. ... try to reserve x amount of memory start at zero? ... memory reservation. ...
    (Linux-Kernel)
  • Re: Copy a buffer to a structure with an offset
    ... > structure but need to specify an offset, in bytes, from the top of the ... > specify the structure name... ... Structure TheStruct ... Dim ts As TheStruct ...
    (microsoft.public.dotnet.languages.vb)
  • Re: String Theory
    ... for the method does not specify that it must work that way. ...
    (comp.lang.java.programmer)
  • Re: How to imitate VBA Label function in Latex
    ... I have done this already for HTML format; ... I want to have horisontally allocated frames with specified horisontal ... offset, filled with specified text. ... offsets, but, in that case, I cant specify e.g. flash left or right. ...
    (comp.text.tex)
  • Re: NASM org directive
    ... used to specify the origin address from the segment so that NASM knows ... I found the operand label address value was ... added by offset when I change the direcive operand. ... In real address mode, the physical address is calculated as segment*16+offset, so segment 0 starts at address 0*16, and the stack pointer is added to that address. ...
    (comp.lang.asm.x86)