Changing Timezones in SunOS 4.0

ted at braggvax.arpa ted at braggvax.arpa
Fri Jan 13 01:29:16 AEST 1989


>From:    munnari!gaia.oz.au!drm at uunet.uu.net (David Moline)
>Once the timezone has been set for a system under version 4.0 is it
>possible to change it to something else without re-installing the OS.

Don't know about 4.0, but in 3.X, there is a kernel varible tz which is
just a structure of 2 ints, the first of which is minutes west of GMT (300
for EST) and the second of which is what kind of Daylight savings is in
effect.  Here's the values from /sys/h/time.h

struct timezone {
        int     tz_minuteswest; /* minutes west of Greenwich */
        int     tz_dsttime;     /* type of dst correction */
};
#define DST_NONE        0       /* not on dst */
#define DST_USA         1       /* USA style dst */
#define DST_AUST        2       /* Australian style dst */
#define DST_WET         3       /* Western European dst */
#define DST_MET         4       /* Middle European dst */
#define DST_EET         5       /* Eastern European dst */
#define DST_CAN         6       /* Canada */
#define DST_GB          7       /* Great Britain and Eire */
#define DST_RUM         8       /* Rumania */
#define DST_TUR         9       /* Turkey */
#define DST_AUSTALT     10      /* Australian style with shift in 1986 */

It is quite feasible to change tz with adb, both for keeps in /vmunix and
on the fly in /dev/kmem.  Perhaps 4.0 has something similar, or better
maybe it is all read from a file somewhere.

	Ted Nolan
	ted at braggvax.arpa



More information about the Comp.sys.sun mailing list