diff --git a/localtime.c b/localtime.c index 4c14069..ad694da 100644 --- a/localtime.c +++ b/localtime.c @@ -734,6 +734,12 @@ const int lastditch; if (name == NULL) return -1; } else dstoffset = stdoffset - SECSPERHOUR; + if (*name == '\0' && load_result != 0) + /* + ** Default to current US rules if TZ has no rules + ** and we can't load the default rules, + */ + name = ",M4.1.0,M10.5.0"; if (*name == ',' || *name == ';') { struct rule start; struct rule end; @@ -796,8 +802,6 @@ const int lastditch; if (*name != '\0') return -1; - if (load_result != 0) - return -1; /* ** Initial values of theirstdoffset and theirdstoffset. */