Totally Zenned
- Join Date:
- Sep 2004
- Posts:
- 2,309
- Plugin Contributions:
- 1
Time Zone Offset (for v1.3.0-thru-v1.3.9d ONLY)
bogia:
After I installed Time Zone Offset module, the date in my website and my admin page is still shown in dd/mm/yy format. I tried to make an order and saw that the date of order (purchased date)in confirmation email before Time Zone Offset is show in D/dd/mm/yy format like Saturday 24th Feruary 2007 while one after Time Zone Offset is shown in yy/mm/dd H/M/S like 2007-02-24 15:30:25. Can you tell me why this change has occured?
I observed the same behavior when I first installed an older version of the TZO mod (01-12-06) on Zen cart 1.26 shop and later mod version (02-13-06) on Zen cart 1.27.
And the latest version of the mod behaves the same on my Zen cart 1.37 shop.
I have just lived with it and thus have not investigated. But if you're really into troubleshooting this then below are some hints (not necessarily solutions).
A date format transformation might be occurring on $date_purchased when inserted into the the database.
And/or issue may be impacted by a change by the mod to a default Zen cart function (e.g. zen_date_long) and/or a related class (e.g. /includes/classes/order.php).
To get around the issue, after querying the date_purchased to display on the orders email (in /admin/orders.php or elsewhere), you should be able to transform date format to display in a format more to your liking (without impacting the underlying data format the database understands). All that is needed is to change to a different date format function from zen_date_long to something else (create your own date format function, using zen_date_long as your basis).
A couple of places to poke around (line numbers might be a bit different in your install):
/admin/orders.php
Line #108 : EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
Line #116 : $html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
/includes/functions/functions_email.php
Line #361 : if ($block['EMAIL_DATE_LONG']=='') $block['EMAIL_DATE_LONG'] = zen_date_long(date("Y-m-d"));
/includes/functions/functions_general.php
Line #194 : function zen_date_long($raw_date) {
/admin/includes/functions/general.php
Line #145 : function zen_date_long($raw_date) {
Woody