From 18bb970bffaac373ec79f080d5cfdea0b015ea91 Mon Sep 17 00:00:00 2001 From: Kevin Kaniaburka Date: Mon, 8 Apr 2024 13:04:09 +0200 Subject: [PATCH] Add timezone to the DateTimeField static builder --- src/Bundle/Builder/Field/DateTimeField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/Builder/Field/DateTimeField.php b/src/Bundle/Builder/Field/DateTimeField.php index f872a2d9..2a95ce97 100644 --- a/src/Bundle/Builder/Field/DateTimeField.php +++ b/src/Bundle/Builder/Field/DateTimeField.php @@ -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]) ; } }