Skip to content

Commit

Permalink
Add timezone to the DateTimeField static builder
Browse files Browse the repository at this point in the history
  • Loading branch information
coldic3 committed Apr 8, 2024
1 parent 2d76e8e commit 18bb970
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bundle/Builder/Field/DateTimeField.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

final class DateTimeField
{
public static function create(string $name, string $format = 'Y-m-d H:i:s'): FieldInterface
public static function create(string $name, string $format = 'Y-m-d H:i:s', ?string $timezone = null): FieldInterface
{
return Field::create($name, 'datetime')
->setOptions(['format' => $format])
->setOptions(['format' => $format, 'timezone' => $timezone])
;
}
}

0 comments on commit 18bb970

Please sign in to comment.