Add site's default time zone to the default values list

Created on 4 October 2023, over 1 year ago
Updated 11 October 2023, over 1 year ago

Problem/Motivation

A default value can be chosen from the time zones list only. Would be great if site's default time zone will be added to the list.

Steps to reproduce

Go to the timezone field Edit page. Set default value.

Proposed resolution

The site's default time zone may be added to the time zones list or added as checkbox.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine goodboy Kharkiv, Ukraine

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

Comments & Activities

  • Issue created by @goodboy
  • πŸ‡ΊπŸ‡ΈUnited States mfb San Francisco

    Sounds like a useful feature, were you interested in contributing as a merge request, or just putting it out there as a suggestion?

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    1 pass
  • πŸ‡ΊπŸ‡ΈUnited States mfb San Francisco

    Since time zone is configurable at both the site and (potentially) user level, folks might want to allow the default value to be set to either the site's default time zone or the current user's time zone.

    Here's a patch that does this with two checkboxes. A literal default value being set will override anything else, so I disable the new checkboxes if the "set default value" checkbox is checked. If both site default and user time zone checkboxes are checked, and the user doesn't have a time zone configured, it will fall back to the site default time zone.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    1 pass
  • πŸ‡ΊπŸ‡ΈUnited States mfb San Francisco

    Add tests

    • mfb β†’ committed e200a758 on 8.x-1.x
      Issue #3391539 by mfb, goodboy: Add site default time zone to the...
  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States mfb San Francisco

    Went ahead and committed this so folks can test it out. @goodboy let me know if you're able to test out the dev branch.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024