# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
-use Carp;
-use DateTime::Format::MySQL;
use Koha::Database;
-use Koha::DateUtils qw(dt_from_string);
+use Koha::DateUtils qw( dt_from_string );
use Koha::Quote;
use base qw(Koha::Objects);
offset => $offset,
}
)->single;
+ }
- unless($quote){
- return;
- }
+ return unless $quote;
+
+ # update the timestamp for that quote
+ $quote->update({timestamp => dt_from_string})->discard_changes;
- # update the timestamp for that quote
- my $dt = $dtf->format_datetime(dt_from_string);
- $quote->update({ timestamp => $dt });
- }
return $quote;
}
return 'Koha::Quote';
}
-1;
\ No newline at end of file
+1;