Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    Manchester, UK
    Posts
    38
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default 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
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  3. #3
    Join Date
    Jun 2006
    Location
    Manchester, UK
    Posts
    38
    Plugin Contributions
    0

    Default 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

  4. #4
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default 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.

    ---
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  5. #5
    Join Date
    Jun 2006
    Location
    Manchester, UK
    Posts
    38
    Plugin Contributions
    0

    Default 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

  6. #6
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default 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
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

 

 

Similar Threads

  1. DOB & Date format warning message in user registration
    By pabloirl in forum General Questions
    Replies: 1
    Last Post: 10 Jan 2012, 05:33 PM
  2. Registration & Birth date - problem with the format
    By sanji in forum General Questions
    Replies: 1
    Last Post: 7 Nov 2007, 05:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR