Commit 99da2f78 authored by Dan McGee's avatar Dan McGee
Browse files

Ensure clocks Expires header works in 59th minute of hour



This was a rather careless oversight on my part.

Signed-off-by: default avatarDan McGee <dan@archlinux.org>
parent 7d8580b4
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment