summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2014-11-04 11:00:54 +0100
committermsquare <msquare@notrademark.de>2014-11-04 11:00:54 +0100
commit428d5d70cbf3cf643348def33c7d53f68ffcea6b (patch)
treeb92ce543a55f91bf48f4791f0532418485ae6eb7 /includes
parentb221b362dc25fcc9686c068b2b5976e157014686 (diff)
parentc4039f72bb12684b0733281ade52696ed4019327 (diff)
Merge pull request #157 from robofish/shiftDurationFix
Fixed shift duration calculation
Diffstat (limited to 'includes')
-rw-r--r--includes/view/Shifts_view.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php
index 824f519a..d0e7d809 100644
--- a/includes/view/Shifts_view.php
+++ b/includes/view/Shifts_view.php
@@ -4,8 +4,8 @@
* @param Shift $shift
*/
function shift_length($shift) {
- $length = round(($shift['end'] - $shift['start']) / (60 * 60), 0) . ":";
+ $length = floor(($shift['end'] - $shift['start']) / (60 * 60)) . ":";
$length .= str_pad((($shift['end'] - $shift['start']) % (60 * 60)) / 60, 2, "0", STR_PAD_LEFT) . "h";
return $length;
}
-?> \ No newline at end of file
+?>