Skip to content

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

@CustomCodeIT

Description

@CustomCodeIT

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions