X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0e75a632271124a628dd600cb7eac739b595144d..2011816080c4a2fc413edca52a7ee6c792d17ca9:/SL/DB/CustomVariable.pm diff --git a/SL/DB/CustomVariable.pm b/SL/DB/CustomVariable.pm index 0971e6466..46428fe82 100644 --- a/SL/DB/CustomVariable.pm +++ b/SL/DB/CustomVariable.pm @@ -44,7 +44,7 @@ sub parse_value { } if ($type =~ m{^(?:date|timestamp)}) { - return $self->timestamp_value(defined($unparsed) ? DateTime->from_kivitendo($unparsed) : undef); + return $self->timestamp_value(!defined($unparsed) ? undef : ref($unparsed) eq 'DateTime' ? $unparsed->clone : DateTime->from_kivitendo($unparsed)); } # text, textfield, select