TZ changes

Guy Harris seismo!sun!gorodish!guy
Fri Apr 10 23:16:51 UTC 1987


	In my experience, the "timezone" variable on USG systems is always
	positive -- that is, application code subtracts its value from
	the current time, rather than adding it.  I have supplied a diff
	for localtime.c so that if USG_COMPAT is defined, the value of the
	global "timezone" variable is forced positive.  This is based on
	observations of Plexus System 3, Xenix System 3, and Xenix System 5.
	I don't know how USG would treat negative offsets from GMT.  

Observations presumably not made in Europe.  You are correct in that
the sign of the "timezone" variable should be positive for time zones
such as those in the Western Hemisphere; however, it is not correct
to force the offset to be positive, as there are places where the
offset simply *isn't* positive (using the UNIX sign conventions).

The correct fix is

	182c185
	< 	timezone = s.ttis[0].tt_gmtoff;
	---
	> 	timezone = -s.ttis[0].tt_gmtoff;
	197c200
	< 			timezone = ttisp->tt_gmtoff;
	---
	> 			timezone = -ttisp->tt_gmtoff;

or something like that.



More information about the tz mailing list