When to use DST rules

Guy Harris seismo!sun!guy
Fri Feb 20 19:28:41 UTC 1987


	This seems like overkill.

Sigh.  We've been through this before.  Existing UNIX systems do
this, and as such people may expect it.  Unless I see good *hard*
evidence that nobody has done this and that nobody will do it, I see
no reason to go through the effort of removing this capability from
the code.

	Since the DST rules are subject to the whims of politicians and
	bureaucrats, any rules beyond the next year are as likely to be
	wrong as right.

No, they're probably more likely to be right than wrong, in most
cases; it *does* take a fair amount of effort, in many countries, to
change those rules.

	I ask this because it seems to me that a file containing several
	years of Daylight Savings Rules can be expensive to search

You don't search the file; you load the whole thing and search a
table.  Several techniques can be done (e.g., binary search), to make
that search faster.

	and a program to calculate Daylight Savings time for multiple years
	is unnecessarily complex.

No, it is *not*!  The code merely searches a table; the complexity of
the code is independent of the size of the table.



More information about the tz mailing list