Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer::__construct
Transforms a \DateTime instance to a string
Signature
public function __construct([string
$inputTimezone = null,
[string
$outputTimezone = null,
[string
$format = 'Y-m-d H:i:s',
[Boolean
$parseUsingPipe = null]]]] )
Parameters
$inputTimezone
—
string
- The name of the input timezone
$outputTimezone
—
string
- The name of the output timezone
$format
—
string
- The date format
$parseUsingPipe
—
object
- Whether to parse by appending a pipe "|" to the parse format
Errors/Exceptions
-
UnexpectedTypeException
- if a timezone is not a string