From 99da2f78b8fbc2577f82895074ae868683e0ed5e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 21 Mar 2012 15:58:15 -0500 Subject: Ensure clocks Expires header works in 59th minute of hour This was a rather careless oversight on my part. Signed-off-by: Dan McGee --- devel/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'devel') diff --git a/devel/views.py b/devel/views.py index d836bd78..328d52e4 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 -- cgit v1.2.3-54-g00ecf