HP OpenVMS Systems

ask the wizard
Content starts here

Timezones, TDF, and Daylight Savings Time?

» close window

The Question is:

 
This problem comes twice a year. After time change between daylight savings and
 standard, system logical SYS$TIMEZONE_DIFFERENTIAL needs to be set manually.
 Otherwise, C function localtime() and system time will not agree. However, C
 function gmtime() wil
l return the proper UTC given the right system time. My understanding is
 
gmtime() = system time - time offset using zone rules pointed to by logical
 SYS$TIMEZONE_RULE, and
 
localtime() = gmtime() + TDF as defined by logical SYS$TIMEZONE_DIFFERENTIAL.
 
The offset from zone rules is calculated based on current date/time, which will
 always be correct give proper system time. TDF requires manual adjustment. If
 TDF does not agree with offset, localtime() will obviously not the same as
 system time.
 
If rules exist, why do we as system administrators need to maintain another TDF
 which is subject to human error? Can the next VMS release or C runtime use
 only rule-based offset for ALL time functions? There are applications (and we
 won't know which until
 problems occur) relying on proper localtime(). We have NTP / DTSS to set time.
 We have zone rules to tell the offset. Get TDF out of the way, please.
 
I also notice the TDF logical exists starting VMS 6, but C runtime does not use
 it until VMS 7. So why is it there? Can it be ignored / deassigned on VMS 6.x?
 


The Answer is :

 
  Timezone rules are available in OpenVMS, the current C RTL already
  uses the rules, an automatic switchover to daylight savings time is
  presently available via DECnet-Plus DECdtss, and an OpenVMS-integrated
  (and optionally enabled) switch-over and better documentation of the
  daylight savings time switch-over is planned for inclusion in a future
  OpenVMS release.
 
  C is not the only consumer of the TDF.
 
  An update to the OpenVMS FAQ is also planned, as this question crops
  up semi-annually.
 

answer written or last revised on ( 6-APR-2000 )

» close window