Hi,
I want to change the dates in the system from MM/DD/YYYY to DD/MM/YYYY. How do I go about doing this? Thanks!
How to change Dates from US to UK format?
-
gfroyle
Re: How to change Dates from US to UK format?
Interesting question...
In config.php in the main cms directory, there is a line that says
$config['locale'] = ' ';
along with a comment that leaving it blank will use the web server's default locale for dates etc.
But if your web server's default is set incorrectly (or by default) to US format, then you can alter the locale manually.
I put
$config['locale'] = 'en_AU';
and all the dates reverted to Australian format.
You might want
$config['locale'] = 'en_GB';
Good luck
Gordon
PS Of course, using EITHER DD/MM/YY or MM/DD/YY is going to confuse SOMEONE. If I have time, I might try to figure out where the dates are actually output and change the formatting string so that it says something like 3-Aug-06 which is still Australian/British style, but also unambiguous. It just requires changing a PHP formatting string, but its not a global config parameter so one would need to track down every place that the PHP function "date" is called.
In config.php in the main cms directory, there is a line that says
$config['locale'] = ' ';
along with a comment that leaving it blank will use the web server's default locale for dates etc.
But if your web server's default is set incorrectly (or by default) to US format, then you can alter the locale manually.
I put
$config['locale'] = 'en_AU';
and all the dates reverted to Australian format.
You might want
$config['locale'] = 'en_GB';
Good luck
Gordon
PS Of course, using EITHER DD/MM/YY or MM/DD/YY is going to confuse SOMEONE. If I have time, I might try to figure out where the dates are actually output and change the formatting string so that it says something like 3-Aug-06 which is still Australian/British style, but also unambiguous. It just requires changing a PHP formatting string, but its not a global config parameter so one would need to track down every place that the PHP function "date" is called.
-
beeswax
Re: How to change Dates from US to UK format?
there isn't a config.php file in my CMSMS directory. how do I change dates in this case? thanks.
Re: How to change Dates from US to UK format?
Euh, there's always a config.php file present inside your CMSMS root... maybe you don't see it due to permissions set on it?
-
beeswax
Re: How to change Dates from US to UK format?
as you can see, there's no config.php. there's some other stuff in there as well which belongs to the hosting company. the only time i see config.php is when I create it for the initial install. am I looking in the wrong place?
[gelöscht durch Administrator]
[gelöscht durch Administrator]
Re: How to change Dates from US to UK format?
CMSMS can't run without a config.php (it contains the paths to the files, database info and other settings), so it's definately there.
It does look like the right location, try logging into your Plesk admin and use it's file manager to check ownership and permissions on config.php.
It does look like the right location, try logging into your Plesk admin and use it's file manager to check ownership and permissions on config.php.
-
beeswax
Re: How to change Dates from US to UK format?
you're right, it's there. I've found another thread detailing how to change the date settings. It doesn't work site-wide, but for the news module which was causing the problems. If I can find the thread again I'll post it here. thanks for your help.


