changeset 516:e30fef63f1ed

Merge
author Magnus Schieder <mschieder@intevation.de>
date Fri, 30 Nov 2018 12:50:00 +0100
parents 9d8b31712380 (diff) 9dc72bf6d6d2 (current diff)
children 35ed3247cdc4
files CHANGES
diffstat 4 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Fri Nov 30 12:44:01 2018 +0100
+++ b/CHANGES	Fri Nov 30 12:50:00 2018 +0100
@@ -1,5 +1,9 @@
 3.2 2018-11-30
 
+ * The human_time function calculates up to 59 minutes, not 60.
+   A mistake in porting from Python2 to Python3 made minutes and hours to float.
+   They are now integers again.
+
  * The time of the currently running entry is cached every minute and after a
    program crash the entry has the description "-no description-".
    information can be found in /doc/old_issues.txt 20180806 Magnus Schieder
--- a/TODO	Fri Nov 30 12:44:01 2018 +0100
+++ b/TODO	Fri Nov 30 12:50:00 2018 +0100
@@ -1,10 +1,6 @@
-20181101 Magnus Schieder
-  getan-report wrote "# total: xx:60h" with the template "wochenbericht".
-  I couldn't reproduce the problem and couldn't find a mistake in the source
-  code. /getan/template.py human_time
-
 20181101 Magnus Schieder
   delete empty projects in getan
+  BER: understand the use case better first
 
 20180806 Magnus Schieder
   The break can be assigned to a project.
--- a/doc/old_issues.txt	Fri Nov 30 12:44:01 2018 +0100
+++ b/doc/old_issues.txt	Fri Nov 30 12:50:00 2018 +0100
@@ -1,3 +1,7 @@
+20181101 Magnus Schieder
+  getan-report wrote "# total: xx:60h" with the template "wochenbericht".
+  /getan/template.py human_time
+
 20180806 Magnus Schieder
   Save running entry if console is closed unexpectedly.
   (e.g. when shutting down the computer)
--- a/getan/template.py	Fri Nov 30 12:44:01 2018 +0100
+++ b/getan/template.py	Fri Nov 30 12:50:00 2018 +0100
@@ -23,8 +23,8 @@
     days = delta.days
     seconds = days * 3600 * 24
     s = seconds + delta.seconds
-    h = s / 3600
-    m = (s % 3600) / 60
+    h = s // 3600
+    m = (s % 3600) // 60
     if (s % 60) >= 30:
         m += 1
         if m == 60:
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)