diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-07-17 18:07:32 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-07-17 18:07:32 +0000 |
commit | e84ba51a3b64fae0f0733a035cedf827627be06e (patch) | |
tree | c43315d86b2317ae455afd96845e31ff59dc82b8 /time/getdate.c | |
parent | 8081cd9cd3e28df8dc2570fea207a20d28e6dd5d (diff) | |
download | glibc-e84ba51a3b64fae0f0733a035cedf827627be06e.tar.gz glibc-e84ba51a3b64fae0f0733a035cedf827627be06e.tar.xz glibc-e84ba51a3b64fae0f0733a035cedf827627be06e.zip |
(__getdate_r): Initialize tm_isdst, tm_gmtoff and tm_zone before calling strptime.
Diffstat (limited to 'time/getdate.c')
-rw-r--r-- | time/getdate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/time/getdate.c b/time/getdate.c index 8ed293cd5f..8c9d16f833 100644 --- a/time/getdate.c +++ b/time/getdate.c @@ -151,6 +151,9 @@ __getdate_r (const char *string, struct tm *tp) /* Do the conversion. */ tp->tm_year = tp->tm_mon = tp->tm_mday = tp->tm_wday = INT_MIN; tp->tm_hour = tp->tm_sec = tp->tm_min = INT_MIN; + tp->tm_isdst = -1; + tp->tm_gmtoff = 0; + tp->tm_zone = NULL; result = strptime (string, line, tp); if (result && *result == '\0') break; |