summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-04-25 15:47:07 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2019-04-25 15:47:07 +0300
commit974c2674ebb8fb6716cc147e04eff6058094565f (patch)
treed38e44cb16305d77d3abbe814d8e51d23890c949 /src
parent811a93f80333d0f31ea9a46d9a1606c8e4ef11da (diff)
parenta39789a02c2d89eaa8289a68a6b0fab0cc4d71dc (diff)
downloadtor-974c2674ebb8fb6716cc147e04eff6058094565f.tar.gz
tor-974c2674ebb8fb6716cc147e04eff6058094565f.zip
Merge branch 'maint-0.4.0'
Diffstat (limited to 'src')
-rw-r--r--src/feature/dircache/dircache.c2
-rw-r--r--src/test/test_dir_handle_get.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/dircache/dircache.c b/src/feature/dircache/dircache.c
index 06bd298aca..1b36f716f4 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;