Fixed a file-reading bug

This commit is contained in:
Bobbi Webber-Manners 2020-06-21 02:54:41 -04:00
parent 1b92f78e48
commit 9c5bc1a270
2 changed files with 4 additions and 4 deletions

View File

@ -253,8 +253,8 @@ void readtimezonefile(void) {
strcpy(dst_tz_code, "EDT");
dst_tz_secs = -14400;
}
fscanf(fp, "%s,%u", nondst_tz_code, &nondst_tz_secs);
fscanf(fp, "%s,%u", dst_tz_code, &dst_tz_secs);
fscanf(fp, "%d,%s", &nondst_tz_secs, nondst_tz_code);
fscanf(fp, "%d,%s", &dst_tz_secs, dst_tz_code);
nondst_tz_code[3] = dst_tz_code[3] = 0;
fclose(fp);
}

View File

@ -1,3 +1,3 @@
EST,-18000
EDT,-14400
-18000,EST
-14400,EDT