Bugzilla – Attachment 36754 Details for
Bug 13601
Get rid of DateTime::Format::DateParse
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13601: Fix special case in basket.pl
Bug-13601-Fix-special-case-in-basketpl.patch (text/plain), 1.56 KB, created by
Jonathan Druart
on 2015-03-10 08:17:38 UTC
(
hide
)
Description:
Bug 13601: Fix special case in basket.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-03-10 08:17:38 UTC
Size:
1.56 KB
patch
obsolete
>From ecaa4e62dee0120538f823848daee3893d30d76b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 9 Mar 2015 09:34:50 +0100 >Subject: [PATCH] Bug 13601: Fix special case in basket.pl > >There is a badly managed date in acqui/basket.pl: >if the date is 15/01/2015 (metric format), it will become >2015-1-15 after the following line: > $estimateddeliverydate = "$year-$month-$day"; >Add_Delta_Days is used at several place, and the ouput is forced to >display date on 4 digits and month/day on 2 digits. >This patch does the same thing for $estimateddeliverydate. > >Note that I previously developed a patch to take this format into account (with missing 0) >in Koha::DateUtils::dt_from_string, but I don't think it's a good idea >to manage bad formated dates. >We will certainly find some issues after previous patches, but it will permit to catch >them! >IMO it's preferable than to keep them hidden. > >The patch was: >--- > acqui/basket.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/acqui/basket.pl b/acqui/basket.pl >index 5379c37..c750856 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -312,7 +312,7 @@ if ( $op eq 'delete_confirm' ) { > if( $basket->{closedate} ) { > my ($year, $month, $day) = ($basket->{closedate} =~ /(\d+)-(\d+)-(\d+)/); > ($year, $month, $day) = Add_Delta_Days($year, $month, $day, $bookseller->{deliverytime}); >- $estimateddeliverydate = "$year-$month-$day"; >+ $estimateddeliverydate = sprintf( "%04d-%02d-%02d", $year, $month, $day ); > } > > # if new basket, pre-fill infos >-- >2.1.0
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 13601
:
35405
|
35406
|
35407
|
35408
|
35433
|
36733
|
36734
|
36735
|
36736
|
36737
|
36745
|
36746
|
36747
|
36748
|
36754
|
36755
|
36756
|
36928
|
36933
|
36939
|
37023
|
37087
|
37088
|
37089
|
37090
|
37091
|
37092
|
37093