Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  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!!

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

    Default Re: Admin date & time in UK format

    Thanks for the advice.

    I will ask my host about this.

    Regards

    Phil

  8. #8
    Join Date
    Jan 2008
    Location
    EGYPT
    Posts
    74
    Plugin Contributions
    0

    Default Re: Admin date & time in UK format

    hi

    I found a contribution do that

    http://www.zen-cart.com/index.php?ma...roducts_id=145

    injoy

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

    Default 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
    Last edited by styrax; 20 Jan 2008 at 05:30 PM. Reason: additional information

  10. #10
    Join Date
    Jan 2008
    Location
    EGYPT
    Posts
    74
    Plugin Contributions
    0

    Default 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

 

 
Page 1 of 2 12 LastLast

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