Bugzilla – Attachment 10811 Details for
Bug 8418
Koha::Calendar is_holiday ignores all user data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8418 - fix dt->truncate( to => 'day' )
Bug-8418---fix-dt-truncate-to--day-.patch (text/plain), 1.29 KB, created by
Chris Cormack
on 2012-07-13 09:26:23 UTC
(
hide
)
Description:
Bug 8418 - fix dt->truncate( to => 'day' )
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-07-13 09:26:23 UTC
Size:
1.29 KB
patch
obsolete
>From fc9a811419341f336550951fa8ff08cf8913b39b Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Wed, 11 Jul 2012 14:47:41 +0200 >Subject: [PATCH] Bug 8418 - fix dt->truncate( to => 'day' ) > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > Koha/Calendar.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm >index ab01e53..2c372f2 100644 >--- a/Koha/Calendar.pm >+++ b/Koha/Calendar.pm >@@ -147,7 +147,7 @@ sub is_holiday { > if ( $self->{weekly_closed_days}->[$dow] == 1 ) { > return 1; > } >- $dt->truncate( to => 'days' ); >+ $dt->truncate( to => 'day' ); > my $day = $dt->day; > my $month = $dt->month; > if ( exists $self->{day_month_closed_days}->{$day}->{$month} ) { >@@ -189,8 +189,8 @@ sub days_between { > sub hours_between { > my ($self, $start_dt, $end_dt) = @_; > my $duration = $end_dt->delta_ms($start_dt); >- $start_dt->truncate( to => 'days' ); >- $end_dt->truncate( to => 'days' ); >+ $start_dt->truncate( to => 'day' ); >+ $end_dt->truncate( to => 'day' ); > # NB this is a kludge in that it assumes all days are 24 hours > # However for hourly loans the logic should be expanded to > # take into account open/close times then it would be a duration >-- >1.7.10.4
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 8418
:
10769
|
10770
|
10773
|
10774
|
10810
|
10811
|
10838
|
10839
|
10840
|
11025
|
11026
|
11611
|
11624