apply users timezone to toolbar queries (#716)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user