# HG changeset patch # User Brian Neal # Date 1285522920 0 # Node ID 4746df47a538b542ad9bbe03a1e6e036dad3bb12 # Parent 85f81377bb5bc585f058ef7e156f375dd4ab3fbd Follow on to last rev (r292) for #126. Missed updating a shoutbox template. Also the repoze.timeago package uses UTC time by default. Change this to local time for now until we decide to switch over to UTC for everything. diff -r 85f81377bb5b -r 4746df47a538 gpp/core/templatetags/core_tags.py --- a/gpp/core/templatetags/core_tags.py Sun Sep 26 17:27:08 2010 +0000 +++ b/gpp/core/templatetags/core_tags.py Sun Sep 26 17:42:00 2010 +0000 @@ -58,6 +58,10 @@ return info +# A somewhat ugly hack until we decide if we should be using UTC time +# everywhere or not. +repoze.timeago._NOW = datetime.datetime.now + @register.filter(name='elapsed') def elapsed(timestamp): """ diff -r 85f81377bb5b -r 4746df47a538 gpp/templates/shoutbox/shout.html --- a/gpp/templates/shoutbox/shout.html Sun Sep 26 17:27:08 2010 +0000 +++ b/gpp/templates/shoutbox/shout.html Sun Sep 26 17:42:00 2010 +0000 @@ -1,5 +1,6 @@ +{% load core_tags %}

{{ shout.user.username }}: {{ shout.html|safe }} -{{ shout.shout_date|date:"D M d Y H:i:s" }} +{{ shout.shout_date|elapsed }}