Skip to content

Conversation

tarasom
Copy link
Contributor

@tarasom tarasom commented Sep 23, 2025

Add a new method that mimics MySQL's CONVERT_TZ() function. This method handles date and time conversions between different time zones, ensuring a consistent testing environment for time-sensitive queries.

The function takes three arguments:

  • dt: The datetime value to convert.
  • from_tz: The source time zone.
  • to_tz: The target time zone.

It uses PHP's native DateTime and DateTimeZone classes for accurate conversion. It also includes robust error handling for invalid arguments and time zones.

@aaronm67 aaronm67 merged commit e5b28a6 into vimeo:master Sep 23, 2025
2 checks passed
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