Last active
October 30, 2023 15:22
-
-
Save MegaphoneJon/60b26e9dc2c1910970e9fb2d00ed3af5 to your computer and use it in GitHub Desktop.
strftime fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/php-8.1-strftime.php b/php-8.1-strftime.php | |
index 178cd5ad2a..646d93f95b 100644 | |
--- a/php-8.1-strftime.php | |
+++ b/php-8.1-strftime.php | |
@@ -102,5 +102,10 @@ | |
$calendar = IntlGregorianCalendar::createInstance(); | |
$calendar->setGregorianChange(PHP_INT_MIN); | |
+ // AW 2023-10-29 Temporary fix for compatibility with PHP 8.1.25 | |
+ if ($locale == 'C') { | |
+ $locale = 'en-US'; | |
+ } | |
+ | |
return (new IntlDateFormatter($locale, $date_type, $time_type, $tz, $calendar, $pattern))->format($timestamp); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment