Hi, the time in the top of my admin panel is reading wrong, how can i adjust it?
Also how can i change the date formats inmy cart to be australian instea dof american?
Hi, the time in the top of my admin panel is reading wrong, how can i adjust it?
Also how can i change the date formats inmy cart to be australian instea dof american?
There is a module for this in the downloads area/other
Zen-Venom Get Bitten
I used the TimeZone mod in the downloads section, and it works fine for this. The Time Zone Offset mod is in the "Other Modules" section of the downloads on this site fixes this.
CLICK HERE
Last edited by rylord; 10 Mar 2007 at 05:42 AM. Reason: added link
As far as the time format, I am no expert of Zen cart, but you might be able to rearrange the data contained in the file:
/includes/functions/functions_general.php
where it says:
And rearrange it to your liking....in the stringCode:// Output a raw date string in the selected locale date format // $raw_date needs to be in this format: YYYY-MM-DD HH:MM:SS function zen_date_long($raw_date) { if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '') ) return false; $year = (int)substr($raw_date, 0, 4); $month = (int)substr($raw_date, 5, 2); $day = (int)substr($raw_date, 8, 2); $hour = (int)substr($raw_date, 11, 2); $minute = (int)substr($raw_date, 14, 2); $second = (int)substr($raw_date, 17, 2); return strftime(DATE_FORMAT_LONG, mktime($hour,$minute,$second,$month,$day,$year)); }
One of the experts on here might be able to give you some more insight on this??Code:return strftime(DATE_FORMAT_LONG, mktime($hour,$minute,$second,$month,$day,$year));
You need to edit
/admin/includes/languages/english.php
&
/includes/languages/english.php
to change the date format in lines such as...
& a couple more places in these 2 filesPHP Code:////
// Return date in raw format
// $date should be in format mm/dd/yyyy
// raw date is in format YYYYMMDD, or DDMMYYYY
if (!function_exists('zen_date_raw')) {
function zen_date_raw($date, $reverse = false) {
if ($reverse) {
return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);
}
}
}
Sorry for my ignorance, but what doi change in these lines....i dont know much about what i am doing.
I'd like to make this change aswell (date format) but I'm not sure what to change in those files? In some places its fairly obvious but in others its not. Could someone maybe post up a copy of the files highlighting the changes?
Try these 2 patched english.php files
Always backup or save the existing english.php files (just in case)
Remember to rename the directory YOUR_TEMPLATE to whatever the name is of the template that you are using before uploading.
If you want to see the differences from normal use a program like winmerge. You will find it saves lots of time when you need to upgrade the site.
The second english.php file I'm not sure where to put it. The file path doesn't match the file path in Zen?
Oz date Includes>languages>my-template
Zen Includes>languages>? choices here are classic folder, english folder and english.php. I'm using blue-sky but thers no blue-sky folders there.
if your template directory is blue-sky
then rename
includes>languages>YOUR_TEMPLATE
to
includes>languages>blue-sky
the file would then be in blue-sky
ie
includes>languages>blue-sky>english.php
I would normally unpack the zip to my computer
rename any YOUR_TEMPLATE directories to the name of the template directory that you are using.
Then ftp the whole directory structure across to your website.