The issue exists in both the time_sheet module as in the atrium_time_tracker feature.

Where:
atrium_time_sheet_user_page()
theme_time_sheet_user_page()

What:
When not using the default settings on /admin/settings/time_tracker/time_sheets a non-existing date (0) is appended to the $days array resulting in a bogus 'Jan 1st 1970' entry at the bottom of the timesheet. This only happens if you have at least one day unchecked on the settings page.

If quick-fixed this, by updating

  // create a new array of the ordered days of the week with timestamps
  $days = array();
  foreach ($days_of_week as $day) {
    $days[$day] = $date_lookup[$day];
  }

to

  // create a new array of the ordered days of the week with timestamps
  $days = array();
  foreach ($days_of_week as $day) {
    if (!$day) {
      continue;
    }
    $days[$day] = $date_lookup[$day];
  }

Comments

codi’s picture

Assigned: Unassigned » codi
Status: Needs review » Fixed

Fixed this one for the time_sheet module. Will have to get to the atrium feature later tomorrow.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.