diff --git a/ChangeLog b/ChangeLog index ff4d43e7a..b8bc439d9 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ $Source$ 2002-09-17 Marc Delisle * lang/spanish: update, thanks to Daniel Hinostroza + * tbl_change.php3: bug 609614, default value for datetime ignored 2002-09-17 Loïc Chapeaux * tbl_change.php3: bug 610310: spaces in drop-down for foreign values diff --git a/tbl_change.php3 b/tbl_change.php3 index 9f517d132..b2b10cf82 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -219,7 +219,12 @@ for ($i = 0; $i < $fields_cnt; $i++) { $field = $row_table_def['Field']; // loic1: current date should not be set as default if the field is NULL // for the current row - if ($row_table_def['Type'] == 'datetime') { + // lem9: but do not put here the current datetime if there is a default + // value (the real default value will be set in the + // Default value logic below) + + if (($row_table_def['Type'] == 'datetime') + && (!isset($row_table_def['Default']))) { // INSERT case if ($insert_mode) { $row[$field] = date('Y-m-d H:i:s', time());