function uc_downpayment_form_alter generates a label for the payment mode selector it generates and inserts into the add_to_cart_form or uc_catalog_buy_it_now_form by taking the date field from the downpayment record, converting it to a UNIX date and then reconverting it to a string using the uc_date_format_default format specifier.
Unfortunately the php date function seems to get confused by a date in Aus/English format (d/m/Y) and on reconversion the date in the selector label comes out in US format (m/d/Y).
I propose therefore that the line
'#description => t("Full payment balance due on @date",
array('@date' => date(variable_get('uc_date_format_default', 'm/d/Y'),
strtotime($downpayment->date)))),
be changed to
'#description => t("Full payment balance due on @date",
array('@date' => $downpayment->date)),
to remove this ambiguity. In the case of prepayment by days, the $downpayment->date field is already in the correct format as generated several lines previously, and in the case of prepayment by due date the date displayed will be what was entered for that product.
Comments
Comment #1
sokrplare commentedThank you for noticing and reporting this bug. We have fixed this similar to the way you suggested, with one change: for prepayment by due date the date displayed also has to take into account the store settings for date, as requested in another issue.
So, now we have:
and later
Many thanks.
Comment #2.0
(not verified) commentedCorrected typo