Bug #76073 [NEW]: IntlCalendar seems to use LC_MESSAGES instead of LC_TIME (start of week)
| From: | mikko dot rantalainen at peda dot net | Date: | Fri, 09 Mar 2018 12:23:42 +0000 |
| Subject: | Bug #76073 [NEW]: IntlCalendar seems to use LC_MESSAGES instead of LC_TIME (start of week) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-214250@lists.php.net to get a copy of this message | ||
From: mikko dot rantalainen at peda dot net
Operating system: Ubuntu Linux 16.04 LTS 64 bit
PHP version: 7.0.28
Package: Date/time related
Bug Type: Bug
Bug description:IntlCalendar seems to use LC_MESSAGES instead of LC_TIME (start of week)
Description:
------------
---
From manual page: http://www.php.net/intlcalendar.getfirstdayofweek
---
The manual does not define how default locale is defined. As a result,
reader probably expects PHP to follow default locale system and honor
LC_TIME (with LC_ALL override if set). However, in reality PHP honors
LC_MESSAGES by default.
Test script:
---------------
$ LC_MESSAGES=en_GB.utf8 LC_TIME=en_GB.utf8 php -r
'var_dump(intlcal_get_first_day_of_week(intlcal_create_instance()));'
$ LC_MESSAGES=en_US.utf8 LC_TIME=en_GB.utf8 php -r
'var_dump(intlcal_get_first_day_of_week(intlcal_create_instance()));'
Expected result:
----------------
Command line code:1:
int(2)
Command line code:1:
int(2)
Actual result:
--------------
Command line code:1:
int(2)
Command line code:1:
int(1)
--
Edit bug report at https://bugs.php.net/bug.php?id=76073&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76073&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76073&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76073&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76073&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76073&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76073&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76073&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76073&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76073&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76073&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76073&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76073&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76073&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76073&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76073&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76073&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76073&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76073&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76073&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76073&r=mysqlcfg