From 533c38dc8f99efe853944b4c5807678f0d8413cc Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 8 Apr 2003 11:30:55 +0000 Subject: [PATCH] fix for #229 --- C4/Date.pm | 4 ++-- insertdata.pl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/C4/Date.pm b/C4/Date.pm index 3b8dcdcd7e..8c3f72d194 100644 --- a/C4/Date.pm +++ b/C4/Date.pm @@ -31,7 +31,7 @@ sub get_date_format sub display_date_format { my $dateformat = get_date_format(); - + if ( $dateformat eq "us" ) { return "mm/dd/yyyy"; @@ -62,7 +62,7 @@ sub format_date } my $dateformat = get_date_format(); - + if ( $dateformat eq "us" ) { Date_Init("DateFormat=US"); diff --git a/insertdata.pl b/insertdata.pl index ed55d71136..81bce7b099 100755 --- a/insertdata.pl +++ b/insertdata.pl @@ -51,8 +51,8 @@ my $query="Select * from borrowers where borrowernumber=$data{'borrowernumber'}" my $sth=$dbh->prepare($query); $sth->execute; if (my $data=$sth->fetchrow_hashref){ - $data{'dateofbirth'}=format_date($data{'dateofbirth'}); - $data{'joining'}=format_date($data{'joining'}); + $data{'dateofbirth'}=format_date_in_iso($data{'dateofbirth'}); + $data{'joining'}=format_date_in_iso($data{'joining'}); $query="update borrowers set title='$data{'title'}',expiry='$data{'expiry'}', cardnumber='$data{'cardnumber'}',sex='$data{'sex'}',ethnotes='$data{'ethnicnotes'}', streetaddress='$data{'address'}',faxnumber='$data{'faxnumber'}',firstname='$data{'firstname'}', @@ -67,8 +67,8 @@ if (my $data=$sth->fetchrow_hashref){ # print $query; }else{ - $data{'dateofbirth'}=format_date($data{'dateofbirth'}); - $data{'joining'}=format_date($data{'joining'}); + $data{'dateofbirth'}=format_date_in_iso($data{'dateofbirth'}); + $data{'joining'}=format_date_in_iso($data{'joining'}); $query="insert into borrowers (title,expiry,cardnumber,sex,ethnotes,streetaddress,faxnumber, firstname,altnotes,dateofbirth,contactname,emailaddress,textmessaging,dateenrolled,streetcity, altrelationship,othernames,phoneday,categorycode,city,area,phone,borrowernotes,altphone,surname, -- 2.39.5