Skip to content

Commit

Permalink
Fix timezone handling on form saves of date fields (CFM-509) (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
arlen authored Mar 25, 2026
1 parent a9fe59c commit 96b4f23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/View/Helper/FieldHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ public function dateField(string $fieldName,
// Get the existing values, if present
if($date_object !== null) {
// Adjust the time back to the user's timezone
$tz = $this->getView()->get('vv_tz');
if($tz) {
$date_object = $date_object->setTimezone($tz);
}
$coptions['value'] = $date_object->i18nFormat($dateFormat);
$pickerDate = $date_object->i18nFormat($dateFormat);
}
Expand Down

0 comments on commit 96b4f23

Please sign in to comment.