3k Associates Inc HP3000 FAQ TWiki TWiki > TWiki > HP3000FAQ > Hp3000Development > Hp3000PosixShell > Hp3000TimeZone TWiki webs:
Main | TWiki | Sandbox
TWiki . { Welcome | Register | Changes | Topics | Index | Search | Go }

How to setup and manage Timezone changes on an HP3000

In the /etc/profile, you need to set the global timezone (TZ) variable. For example,

export TZ=EST5EDT

for Eastern US timezone, Eastern daylight time.

--GeoffHarper?

For new US timezone changes (in effect starting 2007) you need to grab a copy of the latest TZTAB file (resident in SYS) from HP's Jazz server at http://jazz.external.hp.com/TZTAB/ . This file takes care of posix applications of other programs that utilize the POSIX runtime routines for retrieving date/time.

For the basic MPE date time settings, the easiest and most reliable solution is to have a job stream scheduled to run automatically every sunday night at 2:00 AM that checks for a timezone change and makes the appropriate change with the appropriate :SETCLOCK TIMEZONE= command.

Here's an example of the appropriate JCL, provided by DaveGale?:

!showtime
!if  hpday = 1 and &
!   ((hpmonth = 4 and hpdate < 8 and hpyyyy < 2007) or &
!   (hpmonth = 3 and hpdate > 7 and hpdate < 15 and hpyyyy > 2006))
!   #
!   # First Sunday in April, Switch to Daylight Savings Time
!   Setvar _TZ_offset   ![rht(lft(TZ,4),1)]-1
!   Setclock timezone=w![_TZ_offset]:00
!Endif
!If (hpday = 1 and &
!   (hpmonth = 10 and hpdate > 24 and hpyyyy < 2007) or &
!   (hpmonth = 11 and hpdate < 8 and hpyyyy > 2006))
!   #
!   # Last Sunday in October, Switch to Standard Time
!   Setvar _TZ_offset   ![rht(lft(TZ,4),1)]
!   Setclock timezone=w![_TZ_offset]:00
!endif
!Showclock

-- ChrisBartram - 09 Jun 2006



Topic Hp3000TimeZone . { Edit | Attach | Backlinks: Web All webs | Printable | History: r3 < r2 < r1 More }
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.Hp3000TimeZone