You are here

function support_pm_timer_to_hours in Support Ticketing System 7

Same name and namespace in other branches
  1. 6 support_pm/support_pm.module \support_pm_timer_to_hours()

Convert from timer time format to decimal.

2 calls to support_pm_timer_to_hours()
support_pm_admin_reports in support_pm/support_pm.admin.inc
support_pm_plan_overview_weekly in support_pm/support_pm.module

File

support_pm/support_pm.module, line 1055
Support Project Management. @author Jeremy Andrews <jeremy@tag1consulting.com> @package Support

Code

function support_pm_timer_to_hours($time) {
  $time = explode(':', $time);
  if (!isset($time[1])) {
    $time[1] = 0;
  }
  $hours = (int) $time[0];
  $minutes = round((int) $time[1] / 60, 2);
  return $hours + $minutes;
}