Pre-emptively put a lower bound of 1970 to years, instead of putting a lower

bound of 0 to the generated timestamps. Windows' < 1970 bug won't have it
otherwise.
This commit is contained in:
defacer
2005-03-12 01:20:37 +00:00
parent b6942f4948
commit 5e4e027fea
+3 -3
View File
@@ -139,10 +139,10 @@ function olson_todst ($filename) {
// start-of-year timestamp
// TODO: perhaps should consider the current DST rule
$mdl_tz['from_timestamp'] = gmmktime(0, 0, 0, 1, 1, $mdl_tz['from'], 0) + $mdl_tz['gmtoff'] * 60 ;
if ($mdl_tz['from_timestamp'] < 0) {
$mdl_tz['from_timestamp'] = 0;
if($mdl_tz['from'] < 1970) {
$mdl_tz['from'] = 1970;
}
$mdl_tz['from_timestamp'] = gmmktime(0, 0, 0, 1, 1, $mdl_tz['from'], 0) + $mdl_tz['gmtoff'] * 60 ;
$mdl_zones[] = $mdl_tz;
}
}