Better help text for Date and Time Field

Created on 24 March 2025, 3 months ago

Problem/Motivation

Drupal saves and render Date field in certain way. However the way it does, is not very transparent looking at the available documentation. This becomes critical when we have time sensitive fields example Event Date and Time.

During content save Drupal will store Date field in UTC format, the date input by user is considered to be in timezone user belongs to at the time of saving.
During content render Drupal will convert it to viewer's user account timezone in case of logged in user, else in site default time zone in case of anonymous user.

While this works most of the times, however in case where content editor has to create multi geographical data belonging to different timezone it becomes erratic in nature and hard to understand for editor.

Steps to reproduce

1. Add a Date and Time Field in Drupal.
2. The process of Drupal storing and rendering date field is missing.

Proposed resolution

Improve documentation to explain Drupal way of maintaining the date, so site builders take more aware decisions.

💬 Support request
Status

Active

Version

10.5

Component

datetime.module

Created by

🇮🇳India arpitr

Live updates comments and jobs are added and updated live.
  • Needs documentation

    A documentation change is requested elsewhere. For Drupal core (and possibly other projects), once the change has been committed, this status should be recorded in a change record node.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @arpitr
  • 🇮🇳India arunsahijpal

    Working on it.

  • First commit to issue fork.
  • Merge request !11596Issue #3514939: Updated datetime help text. → (Open) created by arunsahijpal
  • Pipeline finished with Failed
    2 months ago
    Total: 138s
    #456195
  • Pipeline finished with Success
    2 months ago
    Total: 339s
    #456202
  • 🇮🇳India arunsahijpal

    Hi @arpitr,
    I've updated the help text, please review.

  • 🇺🇸United States smustgrave

    @arunsahijpal I'd wait for discussion before taking the exact suggestion and implementing

  • 🇮🇳India arpitr

    Thanks @smustgrave, @arunsahijpal intend here is to bring this to discussion to broader group in community.

  • Status changed to Needs work 12 days ago
  • 🇺🇸United States benjifisher Boston area

    @arpitr:

    From the screenshot in the issue summary, I assume you are thinking about the text on the page (now in a modal window) when adding a new field. (For example, start at /admin/structure/types/manage/page/fields, "Create a new field", then choose "Date and time".) We have been discussing that text, along with the text for the other field-type groups, on 📌 [PP1] Refine field descriptions Active . I am adding that as a related issue and giving you credit over there. Please join the discussion there.

    ... intend here is to bring this to discussion to broader group in community.

    If you are interested in this sort of issue, then please join the #ux Slack channel. If you are available on Fridays at 1400 UTC, then we are always happy to have additional points of view for the weekly Usability meeting. The Zoom link is posted in the Slack channel about 10 minutes before each meeting.

    @arunsahijpal:

    You are also welcome to join the Slack channel and the weekly meeting.

    Looking at the MR you created, I think it creates a Help page for the Datetime module. That is related to @aritr's suggestion, but different from it. If you want to keep this issue open, then please update the issue summary, removing the existing screenshot and adding one showing the page you have added. If you are not interested in making those updates, then I think we can close this issue as a duplicate of 📌 [PP1] Refine field descriptions Active .

  • 🇺🇸United States benjifisher Boston area
Production build 0.71.5 2024