Re: Daylight Savings Time Changes On Mar 2, 11:59 am, ibupro...@painkiller.example.tld (Moe Trin) wrote:
> Try moving/copying your new
> zonefiles to /usr/share/zoneinfo. If you are nervous about this, try
> moving the 'America/Denver' file only and run zdump against that zone,
> comparing the result to running against America/Los_Angeles.
>
> Old guy
OK, that gave me the clue I needed...
I just tried again, and I found out that zdump doesn't actually take a
file name, or at least it tries not to. If I give it a complete path
beginning with /, it dumps the file I tell it to. Otherwise, it gets
the file from somewhere else.
If my file is in /users/adam/subdir/testdir, and I cd to subdir, I get
three different results with:
zdump -v testdir/PST8PDT
zdump -v ../subdir/testdir/PST8PDT
zdump -v /users/adam/subdir/testdir/PST8PDT
The first two seem to find some zone file from somewhere, even though
there's no "testdir" in the /usr/share/zoneinfo structure; it somehow
munges the name and comes up with some sort of zone file to dump. And
they come up with different files. The last one is the one I need.
I tried to look at zdump.c, and I don't understand how it works, but
it appears that it isn't trying to open any files itself but rather is
relying on the libraries, which think they're supposed to be reading
files from the standard location unless I fool them (apparently via
the TZ environment variable). This seems like a flaw; I would think
that it would be good practice to run zic first and look at the
resulting files with a dump tool to make sure you've done things right
before you install---rather than to run zic first, install the files,
and then make sure they're correct.
Oh, well. Anyway, it looks like things did work fine. Thanks to
everyone for your help.
-- Adam |