Article View: comp.sys.hp.hpux
Article #15USL C++ Time class and hpux tztab conversion
From: Marcel Bucher
Date: Mon, 02 Oct 1995 15:23
Date: Mon, 02 Oct 1995 15:23
56 lines
2669 bytes
2669 bytes
Hi out there!
I've run against some problems using the USL Time class.
Here in Central Europe we just switched back from daylight savings
to normal time, but my applications using the Time class still report
daylight saving time.
I've tracked down the problem to this:
Time looks at the environment variable TZ and expects something of the
form:
TZ="MET-1METDST;64/5:00,290/3:00"
^ ^ ^ ^
| | | |___ day/hour to switch to winter time
| | |____________ day/hour to switch to summer time
| |_________________ name of normal time with GMT offset
|________________________ name of summer time with GMT offset
whereas the ctime library used by all unix commands on hpux 9.0x (eg date,
ls...) uses the TZ variable as an index into the hpux file /usr/lib/tztab
with entrys like this:
# Middle European Time, Middle European Time Daylight Savings Time
MET-1METDST
0 3 25-31 3 1983-2038 0 METDST-2
0 2 24-30 9 1983-2038 0 MET-1
^ ^ ^ ^ ^ ^
| | | | | |____ name of time and offset to GMT
| | | | |_________ day of week of switching
| | | |_____________ range of years where the to apply
| | |______________________ month of switching
| |________________________ range of day of month to switch
|_______________________________ min/hour of switching
where TZ="MET-1METDST"
The hpux way is much more flexible about the switching day (it gets
computed considering day of week in a certain period), but it seems to be
non standard.
Does anyone out there have any experience with that? How could I possibly
merge the two ways into a single TZ-variable or make the USL library more
hp aware?
Thanks in advance for any help!
--
#include <stddisclaimer.tm>
________________________________________________________________________
| bucher@euu.siemens-albis.ch |
| or X400: c=CH a=ARCOM p=SCN o=SIEMENS-ALBIS ou1=ZRH1 s=BUCHER g=MARCEL |
|________________________________________________________________________|
Technical Details
Message-ID:
<44p04s$6mj@euusp8.siemens-albis.ch>Path:
arc1-ca.pugleaf.net!euu.siemens-albis.ch!zhea008!bucherShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!euu.siemens-albis.ch!zhea008!bucher From: bucher@zhea008 (Marcel Bucher) Newsgroups: comp.sys.hp.hpux,comp.lang.c++ Subject: USL C++ Time class and hpux tztab conversion Date: 2 Oct 1995 15:23:08 GMT Organization: Engineering at Siemens-Albis AG Message-ID: <44p04s$6mj@euusp8.siemens-albis.ch> NNTP-Posting-Host: zhea008.siemens-albis.ch Keywords: USL Time tztab X-Newsreader: TIN [version 1.2 PL2]