I'm getting the customer orders sent to me via email, and the date on the order is
Order Number: 53
Date Ordered: Wednesday 31 December, 1969
The time stamp in the admin screen is correct though....so where is the problem so I can fix it?
I'm getting the customer orders sent to me via email, and the date on the order is
Order Number: 53
Date Ordered: Wednesday 31 December, 1969
The time stamp in the admin screen is correct though....so where is the problem so I can fix it?
Here it is in
admin\orders.php
Code:$html_msg['EMAIL_CUSTOMERS_NAME'] = $check_status->fields['customers_name']; $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID; $html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') .'">'.str_replace(':','',EMAIL_TEXT_INVOICE_URL).'</a>'; $html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']); $html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments); $html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED); $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php
---------------
advanced.programmer at gmail dot com
In love with Zen Cart!!
PLEASE HELP! I don't know how to fix this!
HERE IS MY ZEN CART INFO:
Server OS: Linux 2.4.21-27.ELsmp
Database: MySQL 4.0.27-max-log
Server Date: 10/03/2006 21:35:42
Database Date: 10/03/2006 21:35:42
Server Up Time: 21:35:42 up 186 days, 22:54, 0 users, load average: 3.05, 4.08, 4.42
PHP Version: 4.3.11
Zen Cart 1.3.0.2
Database Patch Level: 1.3.0.2
HTTP Server: Apache
Ok, that out of the way, here is my problem! All of my order confirmations are being sent out with the ORDER DATE of DECEMBER 31, 1969
Although, at the bottom of that order confirmation in the ADMIN section, it gives the proper date and time the order was populated.
How do I FIX the ORDER DATE??? I get emails from my customers telling me my dates are way off... :)
What are your date settings in your english.php file?
The defaults are:Code:@setlocale(LC_TIME, 'en_US.ISO_8859-1'); define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'm/d/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // 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); } } }
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thanks, I knew I had posted this, but couldn't find it today, and the last reponse didn't fix the problem! :)
Ok, here is what my code is:
So, mine isn't matching the default, but I'm wondering if this is because we had to upload a mod, because the server time was off about 8 hours, and we needed to get it adjusted to my time zone.....I'm pretty clueless with this stuff, I have someone that helps me, and they are pretty familiar with coding, but they haven't been able to find the problem either.setlocale(LC_TIME, 'en_US.ISO_8859-1');
define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()
define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
define('PHP_DATE_TIME_FORMAT', 'm/d/Y H:i:s'); // this is used for date()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');
define('DATE_FORMAT_SPIFFYCAL', 'MM/dd/yyyy'); //Use only 'dd', 'MM' and 'yyyy' here in any order
////
// Return date in raw format
// $date should be in format mm/dd/yyyy
// raw date is in format YYYYMMDD, or DDMMYYYY
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);
}
}
The email is using this to generate the date in the email:strftime() uses the setlocale() settings in effect on your server.Code:strftime(DATE_FORMAT_LONG)
When PHP uses Dec 31/1969 as a displayed date, it means that it was asked to display date information that is smaller than the Linux epoch date of 01/01/1970.
There's nothing obvious to me in what you've posted above in terms of what's causing it.
I suspect you're not very interested in finding and undoing all the time-adjustment settings you've made in your code ... but you may have to. I don't see anything here that shows an easy adjustment to make in Zen Cart to fix that.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
I suppose you could try changing these:to this:Code:strftime(DATE_FORMAT_LONG)in both locations near the bottom of the /includes/classes/order.php file (NOT the admin file).Code:zen_date_long(date("Y-m-d"))
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
I am having the same problem and it only recently happened when I installed a mod and renamed my admin directory.
It sends the right date if someone uses the form to contact us but the wrong date for orders.
Any help would be appreciated.
Jason
Bookmarks