diff options
author | George Kadianakis <desnacked@riseup.net> | 2019-04-25 15:46:45 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-04-25 15:46:45 +0300 |
commit | a39789a02c2d89eaa8289a68a6b0fab0cc4d71dc (patch) | |
tree | 91797592eb458ffd06ad62883b4cf7ee3dd455c8 /src | |
parent | 24b68b4777225436c1f5f820e79a6a76ee973313 (diff) | |
parent | 37d7daa3cd22a7dce833e09392bcdbadf6e047f1 (diff) | |
download | tor-a39789a02c2d89eaa8289a68a6b0fab0cc4d71dc.tar.gz tor-a39789a02c2d89eaa8289a68a6b0fab0cc4d71dc.zip |
Merge branch 'tor-github/pr/960' into maint-0.4.0
Diffstat (limited to 'src')
-rw-r--r-- | src/feature/dircache/dircache.c | 2 | ||||
-rw-r--r-- | src/test/test_dir_handle_get.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/dircache/dircache.c b/src/feature/dircache/dircache.c index 62eb4c86c2..eece1e6503 100644 --- a/src/feature/dircache/dircache.c +++ b/src/feature/dircache/dircache.c @@ -124,7 +124,7 @@ write_http_response_header_impl(dir_connection_t *conn, ssize_t length, long cache_lifetime) { char date[RFC1123_TIME_LEN+1]; - time_t now = time(NULL); + time_t now = approx_time(); buf_t *buf = buf_new_with_capacity(1024); tor_assert(conn); diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c index c3a17e7309..e57bd02584 100644 --- a/src/test/test_dir_handle_get.c +++ b/src/test/test_dir_handle_get.c @@ -2526,7 +2526,7 @@ test_dir_handle_get_status_vote_next_bandwidth(void* data) /* Check cache lifetime */ char expbuf[RFC1123_TIME_LEN+1]; - time_t now = time(NULL); + time_t now = approx_time(); /* BANDWIDTH_CACHE_LIFETIME is defined in dircache.c. */ format_rfc1123_time(expbuf, (time_t)(now + 30*60)); char *expires = NULL; |