Code

Display 'today' in the account user's timezone, thanks David Wolever
[roundup.git] / roundup / cgi / templating.py
index 226851de94308db566d0413a7d2e2cbc7e5e56b4..047dfedab158c7b003a0fa439439bab7fa3025c0 100644 (file)
@@ -2827,7 +2827,9 @@ class TemplatingUtils:
 
         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")