Jump to content

Americanize prestashop time zones for 12 hour format and all the dates. Not server time for 1.4.3.0!


Recommended Posts

So how can I set all the dates and time zones for 12 hour format for the USA for presta 1.4.3.0? What else can be done to Americanize presta? Voucher is one that needs to be changed to coupon for a start.

Link to comment
Share on other sites

In classes/tools.php we have the date & time function...


       $language = Language::getLanguage((int)($id_lang));
        if ($language AND strtolower($language['iso_code']) == 'fr')
            return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : ''));
        else
            return ($tmpTab[0].'-'.$tmpTab[1].'-'.$tmpTab[2].($full ? $hour : ''));




I changed the iso code to us and fiddled with it a bit and I have the dates reading correct in admin like this 06-30-2011



       $language = Language::getLanguage((int)($id_lang));
        if ($language AND strtolower($language['iso_code']) == 'US')
            return ($tmpTab[1].'-'.$tmpTab[0].'-'.$tmpTab[2].($full ? $hour : ''));
        else
            return ($tmpTab[1].'-'.$tmpTab[2].'-'.$tmpTab[0].($full ? $hour : ''));




Now I have a time problem in my BO my orders are showing in 24 hour format like this 13:03:10? How can I get admin to show 12 hour format? Something like 6:30am or 6:30pm for the correct time zone I live in. Which is GMT-5 Eastern Standard Time.

Does $full mean 24hour?

I have looked at smarty time http://www.smarty.net/docsv2/en/language.modifier.date.format.tpl
I have looked at php time http://php.net/manual/en/function.date.php

Prestashop time looks nothing like that? I have searched and search presta and search presta with google. The answer is not on this site!

Can just one person please explain how to set time?

Link to comment
Share on other sites

×
×
  • Create New...