Closed WinstonN closed 5 years ago
Hey @WinstonN, try this one instead:
// before loop starts
$formatter = new IntlDateFormatter('locale_code', IntlDateFormatter::NONE, IntlDateFormatter::SHORT);
// use instead of private method call in the loop
$formatter->format(DateTime::createFromFormat('Y-m-d H:i:s', $date));
I saw many locale lookups (~3500 hget calls) on a product/view page with
$this->getCurrentMode() === Navigation::DRIVE_MODE
This PR tries to fix that by setting the locale in memory, then using
strftime
to get the date format