Bug 17444: Enable exporting by time, not only date

Test plan:
1) Apply the patch
2) Edit a biblio
3) run export_records.pl with date time few minutes in the past
for example: --format=xml --record-type=bibs --date="2016-10-14 10:00:05" --filename="koha.xml"
4) look in the file and cofirm that the right record was exported
5) Try the same but with time after the biblio was edited, it shouldn't be exported

Signed-off-by: radiuscz <radek.siman@centrum.cz>

Bug 17444: Follow-up, don't change the name of parameter "date"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 947ab63bb7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Josef Moravec 2015-12-15 12:07:38 +01:00 committed by Frédéric Demians
parent f4b6b70f70
commit ff043fb667
1 changed files with 6 additions and 6 deletions

View File

@ -95,7 +95,7 @@ open STDOUT, '>', $filename if $filename;
my @record_ids;
$timestamp = ($timestamp) ? output_pref({ dt => dt_from_string($timestamp), dateformat => 'iso', dateonly => 1, }): '';
$timestamp = ($timestamp) ? output_pref({ dt => dt_from_string($timestamp), dateformat => 'iso', dateonly => 0, }): '';
if ( $record_type eq 'bibs' ) {
if ( $timestamp ) {
@ -214,7 +214,7 @@ export records - This script exports record (biblios or authorities)
=head1 SYNOPSIS
export_records.pl [-h|--help] [--format=format] [--date=date] [--record-type=TYPE] [--dont_export_items] [--deleted_barcodes] [--clean] [--id_list_file=PATH] --filename=outputfile
export_records.pl [-h|--help] [--format=format] [--date=datetime] [--record-type=TYPE] [--dont_export_items] [--deleted_barcodes] [--clean] [--id_list_file=PATH] --filename=outputfile
=head1 OPTIONS
@ -230,10 +230,10 @@ Print a brief help message.
=item B<--date>
--date=DATE DATE should be entered as the 'dateformat' syspref is
set (dd/mm/yyyy for metric, yyyy-mm-dd for iso,
mm/dd/yyyy for us) records exported are the ones that
have been modified since DATE.
--date=DATETIME DATETIME should be entered as the 'dateformat' syspref is
set (dd/mm/yyyy[ hh:mm:ss] for metric, yyyy-mm-dd[ hh:mm:ss] for iso,
mm/dd/yyyy[ hh:mm:ss] for us) records exported are the ones that
have been modified since DATETIME.
=item B<--record-type>