diff options
author | Dan McGee <dan@archlinux.org> | 2012-03-21 21:58:15 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-03-21 21:58:15 +0100 |
commit | 99da2f78b8fbc2577f82895074ae868683e0ed5e (patch) | |
tree | 5bacbbf0d42550ace5abe6a90a163199a49b13eb | |
parent | 7d8580b4b151f1357632a26739287b9e4e99fc06 (diff) | |
download | archweb-99da2f78b8fbc2577f82895074ae868683e0ed5e.tar.gz archweb-99da2f78b8fbc2577f82895074ae868683e0ed5e.tar.xz |
Ensure clocks Expires header works in 59th minute of hour
This was a rather careless oversight on my part.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | devel/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/views.py b/devel/views.py index d836bd7..328d52e 100644 --- a/devel/views.py +++ b/devel/views.py @@ -101,8 +101,8 @@ def clock(request): response = direct_to_template(request, 'devel/clock.html', page_dict) if not response.has_header('Expires'): # why this works only with the non-UTC date I have no idea... - expire_time = now.replace(minute=utc_now.minute + 1, - second=0, microsecond=0) + expire_time = now.replace(second=0, microsecond=0) + expire_time += timedelta(minutes=1) expire_time = time.mktime(expire_time.timetuple()) response['Expires'] = http_date(expire_time) return response |