Skip to content

Conversation

@labmecanicatec
Copy link
Contributor

Replaced the manual timezone list in config/timezones.php with dynamic generation using DateTimeZone::listIdentifiers(). Removed the jstz.min.js library and updated register.tpl to use the native Intl.DateTimeFormat API for timezone detection, simplifying the code and reducing dependencies.

Replaced the manual timezone list in config/timezones.php with dynamic generation using DateTimeZone::listIdentifiers(). Removed the jstz.min.js library and updated register.tpl to use the native Intl.DateTimeFormat API for timezone detection, simplifying the code and reducing dependencies.
Copy link
Contributor

@JohnVillalovos JohnVillalovos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @labmecanicatec

@JohnVillalovos JohnVillalovos merged commit e2f6cf1 into LibreBooking:develop Jul 30, 2025
11 checks passed
@JohnVillalovos JohnVillalovos requested a review from Copilot July 30, 2025 15:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors timezone handling by replacing the hardcoded timezone list with dynamic generation using PHP's DateTimeZone API, and simplifies client-side timezone detection by removing the jstz.min.js dependency in favor of the native Intl.DateTimeFormat API.

  • Replaced manual timezone list with DateTimeZone::listIdentifiers() for dynamic timezone generation
  • Removed jstz.min.js dependency and updated JavaScript to use native Intl.DateTimeFormat API
  • Simplified timezone detection logic with fallback to "UTC"

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
config/timezones.php Replaced 400+ hardcoded timezone entries with dynamic generation using DateTimeZone::listIdentifiers()
tpl/register.tpl Removed jstz.min.js dependency and updated JavaScript to use native browser APIs for timezone detection

@labmecanicatec labmecanicatec deleted the timezone branch July 30, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants