How do I set the correct date and time settings?

Well, indeed this is not such an easy thing, as it seems, because first the underlying server has to be set up to support the needed locale settings. If this is working, you could for example set the following in your config.php:

For Linux driven Servers

For US American setting, which is all default (you don't need a setting)

define('LOCALE',			'en_US.UTF-8');
define('TIME_FORMAT', 'l, jS \of F Y');
define('TIME_FORMAT_LIST', 'jS \of M. Y');

For correct German dates :
define('LOCALE',		'de_DE.UTF-8');
define('TIME_FORMAT',		'd.m.Y');
define('TIME_FORMAT_LIST',	'd.m.Y');

Eventually you have to install and configure the locales first. Here is an example for Debian or Ubuntu servers:

apt-get install locales
dpkg-reconfigure locales

For Windows driven Servers

Well, unfortunately I have to say, I never got managed to get the correct names for days or months. - at least with the PHP internal webserver I use for development purposes. If somebody has the right tip, just send me an mail.

For correct German dates I tried all of these settings, but without success:

define('LOCALE',			'Germany_German');
define('LOCALE',			'Germany_German.1252');
define('LOCALE',			'Germany_German.utf-8');

For more info have a look at Microsofts information site:

Some more info you will find in the PHP setlocale documentation.

Back to FAQ