UK dates do not format correctly in Orders area of storeadmin (v. 2.72)

In 2.72, a UK date format (ie. j/n/y) isn't properly formatting in the order or shipping dates when that order is saved. This has been corrected in version 2.8. To correct a manually edited file, open the orders.php page from the /storeadmin/ folder and:

  1. Add the following lines to the page, just under the initial open.php require statement:

    // Check date format
    $expchkdate = explode("/", SB_SHORT_DATE);
    $isdatecorrect = 'y';
    for($e=0; $e
    
  2. Change the lines:

    if ($orderdate != 0)
    {
    $splitdate = explode("/",$orderdate);
    $order_date = date("Y-m-d", mktime(0,0,0,$splitdate[0],$splitdate[1],$splitdate[2]));
    }

    to:

    if (!empty($orderdate))
    $order_date = convertformatdate($orderdate);
  3. Change the lines:

    if ($shipdate != 0)
    {
    $splitsdate = explode("/",$shipdate);
    $ship_date = date("Y-m-d", mktime(0,0,0,$splitsdate[0],$splitsdate[1],$splitsdate[2]));
    }

    to:

    if (!empty($shipdate))
    $ship_date = convertformatdate($shipdate);
  4. Change the lines:

    " size="20">

    to:

    " size="8"> 
  5. Change the lines:

    " size="8"> (MM/DD/YY)

    to:

    " size="8">