Admin date & time in UK format
I'm attempting to set the date and time on my Admin page to display in my local time (GMT).
I've amended the admin/includes/languages/english.php to this:
// look in your $PATH_LOCALE/locale directory for available locales..
// on RedHat6.0 I used 'en_US'
// on FreeBSD 4.0 I use 'en_US.ISO_8859-1'
// this may not work under win32 environments..
setlocale(LC_TIME, 'en_GB.ISO_8859-1');
define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime()
define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
define('DATE_FORMAT', 'd/m/Y'); // this is used for date()
define('PHP_DATE_TIME_FORMAT', 'd/m/Y H:i:s'); // this is used for date()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');
define('DATE_FORMAT_SPIFFYCAL', 'dd/MM/yyyy'); //Use only 'dd', 'MM' and 'yyyy' here in any order
which sets the display of date/month in the UK format in my Admin lists, but it doesn't alter the time displayed (it shows as GMT - 6 hours). Is there something up with my syntax, or am I altering the wrong thing?
Thanks in anticipation.
Phil
Re: Admin date & time in UK format
Hi Phil
Just for the experiment sake
Can you test putting
setlocale(LC_TIME, "fra_fra");
and verify if you see any difference in the output?
Thanks
Re: Admin date & time in UK format
Thanks for that.
I've altered it to 'fra_fra' (with single quotes as here) but the time still displays as GMT - 6 hours.
Regards
Phil
Re: Admin date & time in UK format
I can see that setlocale not working on this server
Who is your host? What os of the server
Not sure but see if this helps from the link
http://us.php.net/setlocale
----
after the upgrade to the new stable (woody), you may have encountered that setlocale is not working at all, even though you have the files in the /usr/share/locale directory and everything was fine before the upgrade. in this case look at the /etc/locale.gen file, which contains the generated locales. if it is empty, you do not have any useful locales. to generate the needed locales run 'dpkg-reconfigure locales' as root and select the locales you need.
---
Re: Admin date & time in UK format
Hi
my host is running a Linux server.
Is my problem to do with the fact that I'm running WindowsXP?
Regards,
Phil
Re: Admin date & time in UK format
Client side OS doesnt matters at all
Please ask your host as setlocale doesnt seems to work as expected on the server
Thanks
Re: Admin date & time in UK format
Thanks for the advice.
I will ask my host about this.
Regards
Phil
Re: Admin date & time in UK format
Re: Admin date & time in UK format
Thanks for the information.
I'm running version 1.3.8 so I don't know if the contribtion you have pointed me to will work since it was last updated to 1.3.7. Has anyone tried it with 1.3.8?
My host is in the USA and I'm in the UK, so it looks as though this is pointing me in the right direction, especially since the host is telling me a) the the server is properly configured and b) none of the other users of the server are reporting an equivalent problem.
Regards, Phil
Re: Admin date & time in UK format
dear styrax
it will work fine
mine too host in USA and store in EGYPT and run z1.3.8
try it