Problem
I have set my time zone variable as follows:
$ TZ='MET-1METDST,M3.5.0/2,M9.5.0/2'
$ export TZIn this example, the Middle European time zone is specified, one hour east of GMT, which changes to Daylight Savings time at 2:00 A.M. on the last Sunday in March, and back again at 2:00 A.M. on the last Sunday in September.
If the following is then run:$ date 09290159on SCO UNIX Version 4.2 or SCOOpen Server 3.0, this is displayed:
Sun Sep 29 01:59:00 MET 1996However, on SCO OpenServer 5.0, the following is displayed:
Sun Sep 29 01:59:00 METDST 1996 Cause
This occurs because 01:59 on the last Sunday in September is an "ambiguous" time, that is:
01:59 (AM) MET
and
01:59 (AM) METDSTare both valid times on that day.
On SCO UNIX Version 4.2 or SCOOpen Server 3.0, it is not possible
to specify the time zone to date(C). It will default to the
non-Daylight Savings time zone.SCO OpenServer 5.0 date(C) defaults to the Daylight Savings time zone.
Solution
For consistent behavior between releases, always set the time with date(C), with TZ set to a non-Daylight Savings time zone.
Using the above example:$ TZ=MET-1
$ export TZ
$ date <date>where <date> is a valid date format parameter.
NOTE: date(C) on SCO OpenServer 5.0 has a "-u" parameter which forces
it to set the date relative to GMT, regardless of what TZ is set
to. See also
date(C) timezone(F)