Jump to content
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

Transition Impacts

Tru64 UNIX Software Transition Kit
» 

DSPP Home

» HP STK home
Tru64 UNIX STK
» Home
» Overview
» Tools
» Documentation
» Transition impacts
» Identifier types
» Impact list
» Porting to HP-UX
» FAQ
» Glossary
» Help
» Send us feedback
Site maps
» Tru64 UNIX STK
» DSPP
Content starts here

critical impact:

timezone - time zone data is implemented differently (CrCh29)

DA Impacts

Problem description

The TZ environment variable defines the current time zone in the user's environment. It controls the time zone data that is set by the tzset function, including the timezone, tzname, and daylight external variables.

The semantics of the variables and the function are the same in both Tru64 UNIX and HP-UX. However, the TZ environment variable, which is interpreted differently on Tru64 UNIX and HP-UX, affects the function and variables.

Identifiers

C/C++ Misc. Identifiersdaylight C/C++ Misc. Identifierstimezone Command ArgumentsTZ C/C++ Misc. Identifierstzname C/C++ Functionstzset

See also

Solution description

Review the timezone related code and manpages to see if there is any dependency on Tru64 UNIX specific semantics that are not present on HP-UX.

The following TZ environment variable formats are not supported on HP-UX:

  :
  :pathname

On Tru64 UNIX, the single colon format (:) means to use Coordinated Universal Time (UTC). When the colon-pathname format (:pathname) is used, the characters following the colon specify the pathname of a tzfile(4) format file from which to read the time conversion information.

If your application is setting or depending on the TZ environment variable, you must make sure that you only use the following POSIX standard format:

  stdoffset[dst[offset] [,start[/time],end[/time]]] 

Please be aware that when the TZ environment variable is not defined, the default timezone information is fetched from the file /etc/zoneinfo/localtime in Tru64 UNIX. In HP-UX, the default time zone file is /etc/default/tz. Additionally, the format of the time zone files are different. Tru64 UNIX uses the Olson time zone data file format; HP-UX uses another format.

In HPUX 11iv1 and 11iv2, if this default timezone value could not be read from the timezone adjustment file /usr/lib/tztab, localtime_r returns EST5EDT in time structure tm and tzset sets tzname, timezone and daylight according to EST5EDT timezone.

In HPUX 11iv3 if default timezone value of EST5EDT could not be read from the timezone adjustment file /usr/lib/tztab, localtime_r will return Coordinated Universal Time (UTC) in the time structure tm and tzset will set tzname, timezone and daylight according to the Coordinated Universal Time (UTC) timezone.

See also


Problem summary

classifications source types OS release severity type
DA C, C++, Script any HP-UX 11i version critical changed
Printable version
Privacy statement Using this site means you accept its terms Feedback to DSPP
© 2007 Hewlett-Packard Development Company, L.P.