Skip to content

Commit

Permalink
change locale param of datefmt_create function
Browse files Browse the repository at this point in the history
  • Loading branch information
diegosurita committed Jan 17, 2024
1 parent 53e89b9 commit ec79e3e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/Cake/Test/Case/View/Helper/FormHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ class FormHelperTest extends CakeTestCase {
public function setUp() : void {
parent::setUp();

setLocale(LC_TIME, 'en_US.UTF-8');
Configure::write('Config.language', 'eng');
Configure::write('App.base', '');
Configure::delete('Asset');
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,7 @@ protected function _getDateTimeValue($value, $timeFormat) {
if (is_numeric($value)) {
$value = datefmt_format(
datefmt_create(
locale: setLocale(LC_TIME, 0),
locale: locale_get_default(),
dateType: \IntlDateFormatter::FULL,
timeType: \IntlDateFormatter::FULL,
pattern: 'yyyy-MM-dd HH:mm:SS'
Expand Down

0 comments on commit ec79e3e

Please sign in to comment.