apply users timezone to toolbar queries (#716)

This commit is contained in:
Kevin Papst
2019-04-22 16:21:22 +02:00
committed by GitHub
parent 46cb021260
commit 215d4fc8bf
11 changed files with 69 additions and 81 deletions

View File

@@ -74,4 +74,16 @@ class UserDateTimeFactory
return $date;
}
/**
* @param string $format
* @param null|string $datetime
* @return bool|\DateTime
*/
public function createDateTimeFromFormat(string $format, ?string $datetime = 'now')
{
$date = \DateTime::createFromFormat($format, $datetime, $this->timezone);
return $date;
}
}