From 1643409a312121471d03b431a086ffe6c2f7a7ad Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Tue, 3 Mar 2015 18:17:59 +0200 Subject: [PATCH] Bug 13159 [QA Followup] - Fix transaction_date and undefined warning cli-client doesnt respect the transaction_date format "YYYYMMDDZZZZHHMMSS" Using timestamp() to generate the proper datetime format. "String $value undefined"-warning in build_field() fixed. --- misc/sip_cli_emulator.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/sip_cli_emulator.pl b/misc/sip_cli_emulator.pl index f936428..687f354 100755 --- a/misc/sip_cli_emulator.pl +++ b/misc/sip_cli_emulator.pl @@ -24,6 +24,7 @@ use IO::Socket::INET; use Getopt::Long; use C4::SIP::Sip::Constants qw(:all); +use C4::SIP::Sip; use constant { LANGUAGE => '001' }; @@ -85,7 +86,7 @@ $/ = $terminator; my ( $sec, $min, $hour, $day, $month, $year ) = localtime(time); $year += 1900; -my $transaction_date = "$year$month$day $hour$min$sec"; +my $transaction_date = C4::SIP::Sip::timestamp(); my $terminal_password = $login_password; @@ -459,7 +460,7 @@ sub build_field { return q{} if ( $params->{optional} && !$value ); - return $field_identifier . $value . '|'; + return $field_identifier . (($value) ? $value : '') . '|'; } sub help { -- 1.9.1