Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Issue with supportsTimeZones() helper #15592

Closed
CustomCodeIT opened this issue Aug 24, 2024 · 2 comments
Closed

[5.x]: Issue with supportsTimeZones() helper #15592

CustomCodeIT opened this issue Aug 24, 2024 · 2 comments
Assignees
Labels

Comments

@CustomCodeIT
Copy link

What happened?

Description

My newly deployed Craft 5 website does not pass the timezone check in the system report when deployed on Ubuntu 24.04 despite running the suggested queries and double-checking that the timezone tables have been properly generated as per:

https://craftcms.com/knowledge-base/populating-mysql-mariadb-timezone-tables

I believe I ran into this issue by chance, as I usually run this step on my Mac. This is where all my local dev work happens and where the database is restored from for the first deployment into production.

My Mac has the US timezone directory (in /usr/share/zoneinfo), but Ubuntu does not.

Using "US/*" timezones might not be a reliable check anymore as they appear to be deprecated and are not always included for backward compatibility. See:

https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

If I manually change the timezone to one that exists, everything works as expected.

I believe the supportsTimeZones() helper function should be updated to use different timezones to get a better success rate.

Steps to reproduce

  1. Deploy a brand new site on Ubuntu 24.04, populate the timezones, run all the SQL queries and double check the tables as per the docs to confirm they are populated correctly.

Expected behavior

Should pass the check

Actual behavior

Does not pass the check

Craft CMS version

5.3.4

PHP version

8.3

Operating system and version

Ubuntu 24.04

Database type and version

Maria DB 10.11

Image driver and version

No response

Installed plugins and versions

N/A

@angrybrad
Copy link
Member

Thanks for the report - I've raised a PR for this here: #15601

@brandonkelly
Copy link
Member

Craft 4.12.0 and 5.4.0 are out with that fix. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants