From 90e08b4863dfaecafee5b151478bda4513b12e85 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 23 Mar 2012 19:29:40 -0500 Subject: Make all datetime objects fully timezone aware This is most of the transition to Django 1.4 `USE_TZ = True`. We need to ensure we don't mix aware and non-aware datetime objects when dealing with datetimes in the code. Add a utc_now() helper method that we can use most places, and ensure there is always a timezone attached when necessary. Signed-off-by: Dan McGee --- templates/devel/clock.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/devel') diff --git a/templates/devel/clock.html b/templates/devel/clock.html index 72a57d0..3b00075 100644 --- a/templates/devel/clock.html +++ b/templates/devel/clock.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load tz %} {% block title %}Arch Linux - Developer World Clocks{% endblock %} @@ -10,7 +11,6 @@ depends on developers keeping the time zone information up to date, so if you see 'UTC' listed, pester them to update their settings.

- Arch Server Time: {{ now|date:"Y-m-d H:i T" }}
UTC Time: {{ utc_now|date:"Y-m-d H:i T" }}

@@ -33,7 +33,7 @@ {{ dev.userprofile.alias }} {{ dev.userprofile.location }} {{ dev.userprofile.time_zone }} - {{ dev.current_time|date:"Y-m-d H:i T" }} + {{ utc_now|timezone:dev.userprofile.time_zone|date:"Y-m-d H:i T" }} {% endfor %} -- cgit v1.2.3-24-g4f1b