Fixed all_day calculating from the wrong time

This commit is contained in:
Tom Bloor 2017-08-21 15:16:29 +01:00
parent 6c35bc36e0
commit 3f743f0b5f
3 changed files with 25 additions and 16 deletions

View file

@ -21,6 +21,15 @@ sub search_between {
});
}
sub search_before {
my ( $self, $date ) = @_;
my $dtf = $self->result_source->schema->storage->datetime_parser;
return $self->search({
purchase_time => { '<' => $dtf->format_datetime( $date ) },
});
}
sub today_rs {
my ( $self ) = @_;