Merge "libc: Fix mktime returns an uncorrect time in empty TZ case"

This commit is contained in:
Elliott Hughes
2014-11-17 23:14:57 +00:00
committed by Gerrit Code Review
2 changed files with 25 additions and 0 deletions

View File

@@ -1257,6 +1257,7 @@ tzset_locked(void)
lclptr->ttis[0].tt_gmtoff = 0;
lclptr->ttis[0].tt_abbrind = 0;
(void) strcpy(lclptr->chars, gmt);
lclptr->defaulttype = 0;
} else if (tzload(name, lclptr, TRUE) != 0)
if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0)
(void) gmtload(lclptr);