convert timesheets to UTC with support for user timezone (#372)

This commit is contained in:
Kevin Papst
2019-02-08 18:24:33 +01:00
committed by GitHub
parent 8dcc18dde3
commit d00596d297
58 changed files with 1637 additions and 207 deletions

View File

@@ -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