diff web/templog.py @ 264:205809a8872f

integer division
author Matt Johnston <matt@ucc.asn.au>
date Sat, 13 Jun 2015 21:56:51 +0800
parents 03e540c3ec24
children 0a1c02160e66
line wrap: on
line diff
--- a/web/templog.py	Wed Jun 10 00:13:26 2015 +0800
+++ b/web/templog.py	Sat Jun 13 21:56:51 2015 +0800
@@ -115,11 +115,11 @@
                 + timedelta(minutes=(float(xpos) / (config.GRAPH_WIDTH * config.ZOOM)) * minutes)
             minutes = int(minutes / ZOOM_SCALE)
 
-            end = click_time + timedelta(minutes=minutes/2)
+            end = click_time + timedelta(minutes=minutes//2)
         else:
             # zoom out
             minutes = int(minutes*ZOOM_SCALE)
-            end += timedelta(minutes=minutes/2)
+            end += timedelta(minutes=minutes//2)
 
     if end > datetime.now():
         end = datetime.now()