Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to display a date in french locale.
A solution is to use setlocale(LC_TIME, 'fr_FR');
But I'm looking to set the locale directly in the configuration of my apache server.
In the /etc/httpd/conf/httpd.conf file, I tried

<VirtualHost *:80>
    SetEnv LC_TIME 'fr_FR'

without any effect.
In which php or apache configuration file should I define the LC_TIME variable?

share|improve this question
What happens if you read out the locale after setting it through apache? Also, a few people commented on the settings page that you should specify a charset along with the locale. – Daniel Williams Aug 19 '14 at 22:15

The httpd.conf file is not typically used to set this parameter. Instead, you will want to edit the /etc/php.ini file and set the timezone in date.timezone:


Timezone information can be found on the PHP website

Remember to restart Apache once the changes are made if you are not using PHP-FPM.

share|improve this answer
Unfortunately timezone doesn't manage the locale for date (language for date) neither the LC_TIME variable. – Nicolas May 26 '13 at 23:53
Thanks for the link, but it doesn't answer to my question. I look for a configuration file to set the locale. – Nicolas May 27 '13 at 10:21

There is an existing Apache extra module that could solve your issue :

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.