[Kolab-devel] [issue4184] date_format, when set to %x detects US format despite EN_IE locale

Gavin McCullagh issues at kolab.org
Wed Mar 3 23:11:42 CET 2010


New submission from Gavin McCullagh <gavin.mccullagh at gcd.ie>:

By default the date_format variable is set to %x.  This, if I read the PHP
manual page correctly, should check my locale settings and set the date format
to what would be normal in my part of the world.  

  http://php.net/manual/en/function.strftime.php

That would be dd/mm/yyyy.  However, what I'm getting is mm/dd/yyyy (which is the
favoured format in the USA, but not in Ireland).

According to phpinfo(); my language setting is:

   LANG 	en_IE.UTF-8 

The output of locale -a is:

  C
  en_IE.utf8
  POSIX

and of locale is:

  LANG=en_IE.UTF-8
  LC_CTYPE="en_IE.UTF-8"
  LC_NUMERIC="en_IE.UTF-8"
  LC_TIME="en_IE.UTF-8"
  LC_COLLATE="en_IE.UTF-8"
  LC_MONETARY="en_IE.UTF-8"
  LC_MESSAGES="en_IE.UTF-8"
  LC_PAPER="en_IE.UTF-8"
  LC_NAME="en_IE.UTF-8"
  LC_ADDRESS="en_IE.UTF-8"
  LC_TELEPHONE="en_IE.UTF-8"
  LC_MEASUREMENT="en_IE.UTF-8"
  LC_IDENTIFICATION="en_IE.UTF-8"
  LC_ALL=

Of course, I can set the date_format explicitly to %d/%m/%Y but it would be
preferable for %x to work correctly based on my locale.  I set the language
explicitly (though again, it would be nice if that were done based on the locale
of the server).  

  $nls['defaults']['language'] = 'en_GB';

----------
messages: 23961
nosy: gavinmc
status: unread
title: date_format, when set to %x detects US format despite EN_IE locale

______________________________________
Kolab issue tracker <issues at kolab.org>
<https://issues.kolab.org/issue4184>
______________________________________




More information about the devel mailing list