| 105 | |
| 106 | How do I change the format used for displaying date and time? |
| 107 | ------------------------------------------------------------------ |
| 108 | You change the format by setting an appropriate 'locale' in the Apache config. You do this by adding |
| 109 | |
| 110 | :: |
| 111 | |
| 112 | SetEnv LC_TIME "xx_YY" |
| 113 | |
| 114 | right after the line where you set TRAC_ENV. |
| 115 | |
| 116 | :xx: The language code as defined in `ISO 639`_ |
| 117 | :YY: The upper case, two letter country code as defined in `ISO 3166`_ |
| 118 | |
| 119 | Examples: *de_DE* is Germany, *en_GB* in Great Britain end *fr_FR* is France |
| 120 | |
| 121 | **When it does not work** |
| 122 | |
| 123 | First, you should check, if the chosen locale is installed on the system at all. On Linux, you can use |
| 124 | |
| 125 | :: |
| 126 | |
| 127 | localedef --list-archive |
| 128 | |
| 129 | to list the installed locale definitions. |
| 130 | |
| 131 | If this is not the problem, then LC_TIME may be overridden by LC_ALL or LANGUAGE defined in the system environment. You may try one of them (LANGUAGE has highest priority) instead LC_TIME. Note that LC_TIME just affects the date and time display, whereas LC_ALL and LANGUAGE also affect handling of system messages, sorting and other country dependent output/input. So the conservative way is to stick to LC_TIME if possible. |
| 132 | |
| 133 | .. _`ISO 639`: ftp://ftp.ilog.fr/pub/Users/haible/utf8/ISO_639 |
| 134 | .. _`ISO 3166`: ftp://ftp.ilog.fr/pub/Users/haible/utf8/ISO_3166 |