Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.sys.hp.hpux FAQ
Section - 5.13.4 What is the purpose of the 'timezone' and 'dst' kernel parameters?

( Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Forum archive ]


Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.13.3 How can I convert a timestamp (seconds since the Epoch) to a date/time string?
Next Document: 5.14 Users and Groups
See reader questions & answers on this topic! - Help others by sharing your knowledge
Added: 05/03/02

The 'TZ' environment variable and the 'timezone' and 'dst' kernel
parameters are two independent features to handle timezones and daylight
savings time. The former is meant to replace the latter. Unless your
application programs use out-of-date system calls, you do not have to
configure the 'timezone' or 'dst' kernel parameters.

According to the SAM help menu, the 'timezone' and 'dst' kernel parameters
should be kept in sync with the 'TZ' variable. This was true in the past,
when older system calls were used which referenced the kernel parameters.
These two system calls are gettimeofday(2) and ftime(2). HP-UX
applications and most third party applications do not use these system
calls any more. The manpage for gettimeofday(2) states: "Programs should
use this time zone information only in the absence of the 'TZ' environment
variable."

As long as your application programs use standard libc functions to obtain
timezone information, you do not have to set the 'timezone' or 'dst' kernel
parameters.

If you still need to set these parameters, here is how to do so:

  o for 'timezone': multiply the TZ_offset by 60; i.e. for EST5EDT:
                    TZ_offset = 5, so timezone = 5 * 60 = 300
                    (Valid values range from -720 to 720)
  o for 'dst': check the DST setting and select the proper 'dst' kernel
               value (valid dst values are listed in the SAM help menu
               for 'dst' kernel parameter)

User Contributions:

Comment about this article, ask questions, or add new information about this topic:

CAPTCHA




Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.13.3 How can I convert a timestamp (seconds since the Epoch) to a date/time string?
Next Document: 5.14 Users and Groups

Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
hpux.faq@gmail.com





Last Update March 27 2014 @ 02:11 PM