diff bitten/trac_ext/web_ui.py @ 382:2078b20186cf

Trac 0.11 compatibility fix in timeline event provider.
author cmlenz
date Tue, 24 Jul 2007 22:08:56 +0000
parents 166dcdb9269e
children 3ba9430a5d87
line wrap: on
line diff
--- a/bitten/trac_ext/web_ui.py
+++ b/bitten/trac_ext/web_ui.py
@@ -684,6 +684,11 @@
         if 'build' not in filters:
             return
 
+        if isinstance(start, datetime): # Trac>=0.11
+            from trac.util.datefmt import to_timestamp
+            start = to_timestamp(start)
+            stop = to_timestamp(stop)
+
         add_stylesheet(req, 'bitten/bitten.css')
 
         db = self.env.get_db_cnx()
Copyright (C) 2012-2017 Edgewall Software