Scheduled webform dates not converted to UTC

Created on 11 January 2022, almost 3 years ago
Updated 9 October 2023, about 1 year ago

Problem/Motivation

Scheduled webforms open/close date aren't converted to UTC before being stored in database.

Steps to reproduce

  • Set your users timezone to something other than UTC.
  • Create a webform
  • Attach this webform to a node using a webform field, set it as scheduled and provide a time.

When saving the node, the date will be formatted using WebformDateHelper::formatStorage(). In this method, no timezone is passed to $date->format(), leading to the date that was submitted in a local timezone being saved to the database directly (no tz conversion).

Proposed resolution

Passing the proper timezone to format()-call.

πŸ› Bug report
Status

Closed: won't fix

Version

6.2

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden kevineinarsson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024