Sept. 28, 2004
1:27 p.m.
Another way to avoid problems with really big tm_year values would be to have something such as... #if (sizeof long) > (sizeof int) typedef long raw_year_type; #else typedef long long raw_year_type; #endif ...in the tzfile.h header file and then use the defined type for variables that hold results such as tmp->tm_year + TM_YEAR_BASE. It certainly makes for shorter code; as for the relative efficiency of long long arithmetic versus doubling the number of % operations being done, deponent sayeth not. --ado