diff roundup/cgi/templating.py @ 4331:7327b102920f

Display 'today' in the account user's timezone, thanks David Wolever
author Richard Jones <richard@users.sourceforge.net>
date Fri, 29 Jan 2010 05:52:35 +0000
parents 58b7ba47af87
children 0693f1ff2571
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Fri Jan 29 05:50:20 2010 +0000
+++ b/roundup/cgi/templating.py	Fri Jan 29 05:52:35 2010 +0000
@@ -2827,7 +2827,9 @@
 
         html will simply be a table.
         """
-        date_str  = request.form.getfirst("date", ".")
+        tz = request.client.db.getUserTimezone())
+        current_date = date.Date(".").local(tz)
+        date_str  = request.form.getfirst("date", current_date)
         display   = request.form.getfirst("display", date_str)
         template  = request.form.getfirst("@template", "calendar")
         form      = request.form.getfirst("form")

Roundup Issue Tracker: http://roundup-tracker.org/