Welcome, Guest. Please login or register.
Login with username, password and session length


It's a release candidate! VirtueMart 2.0 RC - the next generation VirtueMart - is available! Read more....

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: [1]   Go Down
Print
Author Topic: Wrong date format in VM, but correct in Joomla  (Read 5983 times)
oribium
Newbie
*
Posts: 5


WWW
« on: November 01, 2008, 18:55:07 PM »

I have a problem with the date format.

The date format on the confirmation email and on the "My Account" "Order information" screen is: "lördag, 01 november 2008". I would like the date format to be "2008-11-01". In Joomla the date format appears correctly: "2008-11-01"

I am using Joomla 1.0.15 and VM 1.0.15

The Joomla language file contains the lines:

DEFINE('_DATE_FORMAT_LC',"%Y-%m-%d"); //Uses PHP's strftime Command Format
DEFINE('_DATE_FORMAT_LC2',"%Y-%m-%d,%H:%M:%S %Z Vecka:%V");

These lines seems fine to me.

Regards
Logged

Pisu
Moderator
Sr. Member
*
Posts: 435


..still looking for..


WWW
« Reply #1 on: November 19, 2008, 05:50:57 AM »

For account - order list, open file classes/ps_orders.php in the VM admin folder, and go to line 578:

Code:
   $tmp_cell = "<strong>".$VM_LANG->_PHPSHOP_ORDER_PRINT_PO_DATE.":</strong> " . strftime("%d. %B %Y", $db->f("cdate"));

And for account - order details, open file html/account.order_details.php, and go to line 135:

Code:
    <td><?php echo strftime"%d %B %Y"$db->f("cdate")); ?></td>

You can change the "%d %B %Y" format, according to strftime function:
http://www.php.net/manual/en/function.strftime.php
Logged

Pages: [1]   Go Up
Print
Jump to: