+
+ my $userid = $cgi->param('userid') || '';
+ my $branchcode = $cgi->param('branchcode') || '';
+ my $timestamp = $cgi->param('timestamp') || '';
+ my $action = $cgi->param('action') || '';
+ my $barcode = $cgi->param('barcode') || '';
+ my $amount = $cgi->param('amount') || 0;
+ $barcode =~ s/^\s+//;
+ $barcode =~ s/\s+$//;
+ my $cardnumber = $cgi->param('cardnumber') || '';
+ $cardnumber =~ s/^\s+//;
+ $cardnumber =~ s/\s+$//;
+
+ # KOCT send UTC timestamp, it should be converted to local timezone
+ my $dt = dt_from_string($timestamp, 'iso', DateTime::TimeZone->new(name => 'UTC'));
+ $dt->set_time_zone(C4::Context->tz);
+ $timestamp = $dt->ymd('-') . ' ' . $dt->hms(':');
+