Fixed: DST name not found if offset contains minutes

When parsing POSIX TZ definition string in Timezone::tzTime(), DST name of the time zone couldn't be found if TZ offset contained minutes (after ':').
pull/88/head
Alexei Kireev 6 years ago committed by GitHub
parent 8e8a459a09
commit cdac2447f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -644,6 +644,7 @@ time_t Timezone::tzTime(time_t t, ezLocalOrUTC_t local_or_utc, String &tzname, b
if (c && state == OFFSET_MIN) { if (c && state == OFFSET_MIN) {
if (!isDigit(c)) { if (!isDigit(c)) {
state = DST_NAME; state = DST_NAME;
dstname_begin = strpos;
ignore_nums = false; ignore_nums = false;
} else { } else {
if (!offset_min) offset_min = atoi(_posix.c_str() + strpos); if (!offset_min) offset_min = atoi(_posix.c_str() + strpos);

Loading…
Cancel
Save