@@ -, +, @@ --- Koha/Object.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/Koha/Object.pm +++ a/Koha/Object.pm @@ -141,7 +141,9 @@ sub store { } elsif ( _date_or_datetime_column_type( $columns_info->{$col}->{data_type} ) ) { # Set to null if an empty string (or == 0 but should not happen) - $self->$col(undef) unless $self->$col; + # Skip a default value for dates LIKE CURRENT_TIMESTAMP + # In DBIx represented as: default_value => \'now()' + $self->$col(undef) unless $self->$col || $columns_info->{$col}->{default_value}; } } --