I have the following code which I believe should output fr_FR
as the locale but for some reason is outputting en_US_POSIX
(it does this on any timezone). What have I done wrong?
$loc = IntlCalendar::createInstance(new DateTimeZone('Europe/Paris'));
echo $loc->getLocale(Locale::VALID_LOCALE);
For refs: https://www.php.net/manual/en/intlcalendar.createinstance.php and https://www.php.net/manual/en/intlcalendar.getlocale.php
As it appears this isn't the correct way (even though the code is valid) - is there a more suitable way to find a "default" locale for a given timezone?