--- uc_lto.module	2012-01-27 14:55:39.987600762 +1100
+++ uc_lto2.module	2012-01-27 14:59:15.476600787 +1100
@@ -75,6 +75,7 @@
       case 'insert':
       
         $expiration = strtotime($node->expiration);
+
         if ($node->lto_type > 0) {
           db_query("INSERT INTO {uc_lto} (nid, expiration, type) VALUES ('%d', '%s', '%d')", $node->nid, $expiration, $node->lto_type);
         } 
@@ -88,11 +89,11 @@
           if ($expiration !== NULL && $expiration != $prev_expiration) {
             db_query("UPDATE {uc_lto} SET expiration = '%s', type = '%d' WHERE nid = '%d'", $expiration, $node->lto_type, $node->nid);
           }
-          elseif ($expiration === NULL || $node->lto_type == 0) {
+          elseif ($expiration === NULL) {
             db_query("DELETE FROM {uc_lto} WHERE nid = '%d'", $node->nid);
           }
         }
-        elseif ($expiration !== NULL && $node->lto_type > 0) {
+        elseif ($expiration !== NULL) {
           db_query("INSERT INTO {uc_lto} (nid, expiration, type) VALUES ('%d', '%s', '%d')", $node->nid, $expiration, $node->lto_type);
         }
         break;
@@ -162,6 +163,7 @@
   if (uc_product_is_product_form($form)) {
 
     $expiration = /* format_date(*/intval($form['#node']->expiration)/*, 'custom', 'r') */;
+
     $defaultexpiration = time() + 3600;
 
     if (isset($form['#node']->nid)) {
@@ -204,7 +206,7 @@
         '#type' => 'date_popup',
         '#title' => t('Expiration date &amp; time'),
         '#description' => t('Select the date and time when this limited time offer product can no longer be purchased (relative to the server&rsquo;s local time).'),
-        '#default_value' => $expiration ? format_date($expiration, 'custom', 'd-m-Y H:i:s') : format_date($defaultexpiration, 'custom', 'd-m-Y H:i:s'),
+        '#default_value' => $expiration ? format_date($expiration, 'custom', 'Y-m-d H:i:s') : format_date($defaultexpiration, 'custom', 'Y-m-d H:i:s'),
         '#weight' => 10,
       ),
     );
@@ -417,4 +419,4 @@
       'uc_lto_box' => $form_state['values']['fields']['uc_lto_box'],
     ));
   }
-}
+}
\ No newline at end of file
