]> diplodocus.org Git - nmh/commitdiff
datetime.c: Fix parse-failure's error-message's daylight indication.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 9 Sep 2017 11:05:22 +0000 (12:05 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sat, 9 Sep 2017 11:28:36 +0000 (12:28 +0100)
`in_standard' was being used to decide between `standard' and `daylight'
in the error message, but it would always be false by that point.
`in_daylight' is what's passed to the parsing function so use that to
determine the string instead.  Bug present since the initial
implementation.

sbr/datetime.c

index 09c8332..bcf1a9a 100644 (file)
@@ -181,7 +181,7 @@ load_timezones (const contentline *clines) {
                 } else {
                     inform("failed to parse start time %s for %s",
                             params->dtstart,
-                            in_standard ? "standard" : "daylight");
+                            in_daylight ? "daylight" : "standard");
                     return NULL;
                 }
                 params = NULL;