Hi,
We try to upgrade our OS from Solaris 2.3 to 2.4 but we find
the Hongkong time zone inconsistent between two releases.
We use Rouge Wave Tools.h++ (a C++ class library) to develop
our application. And we find our application on Solaris 2.4i
goes one hour faster than the UNIX system time. We reported
our problem to Rouge Wave Technical Support and they said the
problem is due to inconsistency in the value of the daylight
variable (declared in time.h) between Solaris 2.3 and 2.4
for the Hongkong timezone.
Rogue Wave adds the one hour offset of daylight saving
according to whether the daylight variable is set or not.
However, the behavior of that variable is different on
Solaris 2.3 and 2.4.
We ran the following program on 2.3 and 2.4 respectively
and got the results below.
-- Program Listing --
#include <stdio.h>
#include <time.h>
main()
{
time_t t = time(NULL);
printf("current time = %s", ctime(&t));
printf("daylight = %d\n", daylight);
-- Run on Solaris 2.3 --Quote:}
$ uname -a
SunOS europa 5.3 Generic sun4c sparc
$ echo $TZ
Hongkong
$ tz
current time = Thu Jul 27 11:47:57 1995
daylight = 0
$ export TZ=HKT-8
$ tz
current time = Thu Jul 27 11:48:15 1995
daylight = 0
$
----
-- Run on Solaris 2.4 --
$ uname -a
SunOS mao 5.4 generic sun4c sparc
$ echo $TZ
Hongkong
$ tz
current time = Thu Jul 27 11:46:02 1995
daylight = 1
$ export TZ=HKT-8
$ tz
current time = Thu Jul 27 11:46:14 1995
daylight = 0
$
----
You can see if the timezone is set to Hongkong. The daylight
variable is set to 1 on Solaris 2.4 but 0 on Solaris 2.3 where
we haven't that time problem. Since the timezone is set by the
system after we chose Hongkong as our timezone during the OS
installation, we prefer not to modify our timezone of get rid of
that problem.
Do anyone of you see this problem? I wonder if the inconsistency
of daylight value for the Hongkong timezone between 2.3 and 2.4
is a bug. Is it a patch there?
--Thomas