I'm trying to write a C++ wrapper for the timezone database. I have run ZIC to convert the data to binary files and know where these are. Now I'm having a look at zdump because, when I'm done, I want to convert UTC to a time zone of my choice. Problem is when I run zdump it never seems to return anything different. E.g., thom@hehl /cygdrive/c/javatools/tzinfo/src $ ./zdump America/Anchorage America/Anchorage Mon Oct 24 19:46:24 2011 GMT thom@hehl /cygdrive/c/javatools/tzinfo/src $ ./zdump America/Chicago America/Chicago Mon Oct 24 19:46:34 2011 GMT thom@hehl /cygdrive/c/javatools/tzinfo/src $ ./zdump America/Kentucky/Louiville America/Kentucky/Louiville Mon Oct 24 19:48:21 2011 GMT My clock is current set to Eastern Daylight. Thanks.
Thom Hehl wrote:
Problem is when I run zdump it never seems to return anything different.
The argument to zdump isn't a filename, it's a $TZ setting. If your host system doesn't have the Olson tzfiles installed then you won't get interesting data from Olson zone names, because by default zdump will look for the file in the system zoneinfo directory. Unfortunately the failure mode when the file isn't found is uninformative. However, it should work if you give an *absolute* pathname to a tzfile, because that's one of the accepted forms of $TZ. E.g., "./zdump $PWD/tzdir/America/Anchorage". -zefram
Try zdump -v -c 2010 America/Anchorage and the other zones. In my experience, if zdump does not find the tzinfo files, it outputs always the same info, whithout warning or error. To me it looks as if it does not find the binary files. On 24.10.11 21:48, Thom Hehl wrote:
$ ./zdump America/Anchorage
America/Anchorage Mon Oct 24 19:46:24 2011 GMT
thom@hehl /cygdrive/c/javatools/tzinfo/src
$ ./zdump America/Chicago
America/Chicago Mon Oct 24 19:46:34 2011 GMT
thom@hehl /cygdrive/c/javatools/tzinfo/src
$ ./zdump America/Kentucky/Louiville
America/Kentucky/Louiville Mon Oct 24 19:48:21 2011 GMT
My clock is current set to Eastern Daylight.
Thanks.
participants (3)
-
Alois Treindl -
Thom Hehl -
Zefram