Bugzilla – Attachment 3617 Details for
Bug 6042
SIP : Format dates as should be in Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
SIP Format dates as should be in Koha
0001-Bug-6042-SIP-Format-dates-as-should-be-in-Koha.patch (text/plain), 2.75 KB, created by
Alex Arnaud
on 2011-04-04 11:57:46 UTC
(
hide
)
Description:
SIP Format dates as should be in Koha
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2011-04-04 11:57:46 UTC
Size:
2.75 KB
patch
obsolete
>From c9bca1103f40ce8b65ae9fda4513ba9e96cc03ee Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Mon, 4 Apr 2011 13:55:14 +0200 >Subject: [PATCH] Bug #6042 SIP : Format dates as should be in Koha > >--- > C4/SIP/Sip/MsgType.pm | 13 +++++++------ > 1 files changed, 7 insertions(+), 6 deletions(-) > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 508a06b..9675278 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -18,6 +18,7 @@ use Sip::Checksum qw(verify_cksum); > use Data::Dumper; > use CGI; > use C4::Auth qw(&check_api_auth); >+use C4::Dates; > > use UNIVERSAL qw(can); # make sure this is *after* C4 modules. > >@@ -545,7 +546,7 @@ sub handle_checkout { > $resp .= add_field(FID_ITEM_ID, $item_id); > $resp .= add_field(FID_TITLE_ID, $item->title_id); > if ($item->due_date) { >- $resp .= add_field(FID_DUE_DATE, Sip::timestamp($item->due_date)); >+ $resp .= add_field( FID_DUE_DATE, C4::Dates->new($item->due_date,'iso' )->output() ); > } else { > $resp .= add_field(FID_DUE_DATE, q{}); > } >@@ -988,7 +989,7 @@ sub handle_patron_info { > > # SIP 2.0 extensions used by Envisionware > # Other terminals will ignore unrecognized fields (unrecognized field identifiers) >- $resp .= maybe_add(FID_PATRON_BIRTHDATE, $patron->birthdate); >+ $resp .= maybe_add( FID_PATRON_BIRTHDATE, C4::Dates->new($patron->birthdate,'iso')->output() ); > $resp .= maybe_add(FID_PATRON_CLASS, $patron->ptype); > > # Custom protocol extension to report patron internet privileges >@@ -1128,13 +1129,13 @@ sub handle_item_information { > $resp .= add_field(FID_HOLD_QUEUE_LEN, $i); > } > if ($item->due_date) { >- $resp .= add_field(FID_DUE_DATE, Sip::timestamp($item->due_date)); >+ $resp .= add_field( FID_DUE_DATE, C4::Dates->new($item->due_date,'iso' )->output() ); > } > if (($i = $item->recall_date) != 0) { >- $resp .= add_field(FID_RECALL_DATE, Sip::timestamp($i)); >+ $resp .= add_field( FID_RECALL_DATE, C4::Dates->new($i,'iso' )->output() ); > } > if (($i = $item->hold_pickup_date) != 0) { >- $resp .= add_field(FID_HOLD_PICKUP_DATE, Sip::timestamp($i)); >+ $resp .= add_field( FID_HOLD_PICKUP_DATE, C4::Dates->new($i,'iso' )->output() ); > } > > $resp .= maybe_add(FID_SCREEN_MSG, $item->screen_msg); >@@ -1360,7 +1361,7 @@ sub handle_renew { > $resp .= add_field(FID_PATRON_ID, $patron->id); > $resp .= add_field(FID_ITEM_ID, $item->id); > $resp .= add_field(FID_TITLE_ID, $item->title_id); >- $resp .= add_field(FID_DUE_DATE, Sip::timestamp($item->due_date)); >+ $resp .= add_field( FID_DUE_DATE, C4::Dates->new($item->due_date,'iso' )->output() ); > if ($ils->supports('security inhibit')) { > $resp .= add_field(FID_SECURITY_INHIBIT, > $status->security_inhibit); >-- >1.6.3.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6042
: 3617