agungsugiarto / boilerplate

CodeIgniter4 Boilerplate based on AdminLTE 3 with user management, roles, permissions, ...
MIT License
158 stars 49 forks source link

language bug #72

Closed jorgemartinsalas closed 4 years ago

jorgemartinsalas commented 4 years ago

if I configure my application in the following way: in app/Config/App.php public $defaultLocale = 'ar'; public $negotiateLocale = false; public $supportedLocales = ['ar']; public $appTimezone = 'America/Argentina/Salta'; public $charset = 'UTF-8';

in app/Config/Boilerplate.php public $i18n = 'Spanish';

then I get this error. In my-app/admin/user/profile Exception DateTime::__construct(): Failed to parse time string (٢٠٢٠-٠٨-٠٣ ١٧:٠٠:٤٩) at position 0 (�): Unexpected character

https://subefotos.com/ver/?e87dadd2778911569dd6270b16cdedd1o.png

agungsugiarto commented 4 years ago

The function humanize() is extends from Time() class, i believe codeigniter 4 related bug. Please summit issue to https://github.com/codeigniter4/CodeIgniter4 to explain with example:

$time = \CodeIgniter\I18n\Time::parse("2020-06-23 23:02:00");
echo $time->humanize();