summaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-12 14:39:06 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-12 14:39:06 -0400
commit20b01cece8cd2ceb7f8051aee04294bdba471f1a (patch)
tree49af27aa7e343dce9e05507cee1b00c063e07a02 /src/common/util.c
parent0b477bfd55b16d04ddd97cec09ec978e2a57ba3b (diff)
parente57f26c135b03f5dbde77aea24551b6a9fc20889 (diff)
downloadtor-20b01cece8cd2ceb7f8051aee04294bdba471f1a.tar.gz
tor-20b01cece8cd2ceb7f8051aee04294bdba471f1a.zip
Merge branch 'bug18977_024_v2' into bug18977_026_v2
Had conflicts related to other correct_tm bugs in 0.2.6. Added wday for another case.
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 442d57a2cf..a3a6ec8a56 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1758,6 +1758,7 @@ parse_iso_time_(const char *cp, time_t *t, int strict)
st_tm.tm_hour = hour;
st_tm.tm_min = minute;
st_tm.tm_sec = second;
+ st_tm.tm_wday = 0; /* Should be ignored. */
if (st_tm.tm_year < 70) {
char *esc = esc_for_log(cp);
@@ -1825,6 +1826,7 @@ parse_http_time(const char *date, struct tm *tm)
tm->tm_hour = (int)tm_hour;
tm->tm_min = (int)tm_min;
tm->tm_sec = (int)tm_sec;
+ tm->tm_wday = 0; /* Leave this unset. */
month[3] = '\0';
/* Okay, now decode the month. */