Skip to content

Instantly share code, notes, and snippets.

@vyspiansky
Created April 12, 2024 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyspiansky/1e1f79e537460d4c965f4c586772aade to your computer and use it in GitHub Desktop.
Save vyspiansky/1e1f79e537460d4c965f4c586772aade to your computer and use it in GitHub Desktop.
Get a timezone for Ukraine in PHP 8+

To retrieve a timezone for Ukraine in PHP 8+

php -r "var_export(DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, 'UA'));"

Possible output:

array (
  0 => 'Europe/Kyiv',
  1 => 'Europe/Simferopol',
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment