Timesheet: more timezone date fixes

This time start time was improperly processed, fixed end_time too
This commit is contained in:
nathangray 2021-01-27 10:23:22 -07:00
parent 26bff6c66d
commit 40aaf76796
2 changed files with 5 additions and 5 deletions

View File

@ -134,15 +134,15 @@ class timesheet_ui extends timesheet_bo
{
//$content['ts_start'] += $content['start_time'];
$start = new Api\DateTime($content['ts_start']);
$start_time = explode(':',$content['start_time']);
$start->setTime($start_time[0],$start_time[1]);
$start_time = new Api\DateTime($content['start_time']);
$start->setTime($start_time->format('H'),$start_time->format('i'));
$content['ts_start'] = $start->format('ts');
}
if (isset($content['end_time'])) // end-time specified
{
$end = new Api\DateTime($content['ts_start']);
$end_time = explode(':',$content['end_time']);
$end->setTime($end_time[0],$end_time[1]);
$end_time = new Api\DateTime($content['end_time']);
$end->setTime($end_time->format('H'),$end_time->format('i'));
}
if ($end && $start) // start- & end-time --> calculate the duration
{

View File

@ -112,7 +112,7 @@
<date-duration id="ts_duration" options=",hm" class="et2_fullWidth" />
<description/>
<description value="or endtime" class="et2_noWrap"/>
<date-timeonly id="end_time" options="H:i" class="et2_fullWidth"/>
<date-timeonly id="end_time" class="et2_fullWidth"/>
</row>
<row>
<tabbox id="tabs" class="et2_nowrap" width="100%" span="all" tab_height="165">