convert timesheets to UTC with support for user timezone (#372)
This commit is contained in:
@@ -40,6 +40,7 @@ class DateExtensions extends \Twig_Extension
|
||||
new TwigFilter('month_name', [$this, 'monthName']),
|
||||
new TwigFilter('date_short', [$this, 'dateShort']),
|
||||
new TwigFilter('date_time', [$this, 'dateTime']),
|
||||
new TwigFilter('time', [$this, 'time']),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -65,6 +66,15 @@ class DateExtensions extends \Twig_Extension
|
||||
return date_format($date, $format);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DateTime $date
|
||||
* @return string
|
||||
*/
|
||||
public function time(DateTime $date)
|
||||
{
|
||||
return date_format($date, 'H:i');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime $date
|
||||
* @return string
|
||||
|
||||
@@ -86,7 +86,7 @@ class Extensions extends \Twig_Extension
|
||||
'user' => 'fas fa-user',
|
||||
'visibility' => 'far fa-eye',
|
||||
'settings' => 'fas fa-wrench',
|
||||
'export' => 'fas fa-database',
|
||||
'export' => 'fas fa-file-export',
|
||||
'pdf' => 'fas fa-file-pdf',
|
||||
'csv' => 'fas fa-table',
|
||||
'ods' => 'fas fa-table',
|
||||
|
||||
Reference in New Issue
Block a user