Bugzilla – Attachment 98827 Details for
Bug 24643
Koha::DateUtils::dt_from_string rfc3339 cannot handle high precision seconds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24643: Add test to cover the timezone
Bug-24643-Add-test-to-cover-the-timezone.patch (text/plain), 1.53 KB, created by
Jonathan Druart
on 2020-02-13 13:25:50 UTC
(
hide
)
Description:
Bug 24643: Add test to cover the timezone
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-13 13:25:50 UTC
Size:
1.53 KB
patch
obsolete
>From a4e5df7b4757ce0254048de6fba92e71078ef42b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 13 Feb 2020 14:24:52 +0100 >Subject: [PATCH] Bug 24643: Add test to cover the timezone > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/DateUtils.t | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/t/DateUtils.t b/t/DateUtils.t >index df49fcd506..8a606d6cc6 100755 >--- a/t/DateUtils.t >+++ b/t/DateUtils.t >@@ -4,7 +4,7 @@ use DateTime::TimeZone; > > use C4::Context; > >-use Test::More tests => 71; >+use Test::More tests => 72; > > use Test::MockModule; > use Test::Warn; >@@ -131,8 +131,11 @@ cmp_ok( $dt0->epoch(), 'eq', '1325462340', 'dt_from_string handles seconds with > $dt0 = dt_from_string( '2012-01-01T23:59:00.00Z', 'rfc3339' ); > cmp_ok( $dt0->epoch(), 'eq', '1325462340', 'dt_from_string handles seconds with 2 decimal places' ); > >-$dt0 = dt_from_string( '2012-01-01T23:59:00.000Z', 'rfc3339' ); >-cmp_ok( $dt0->epoch(), 'eq', '1325462340', 'dt_from_string handles seconds with 3 decimal places' ); >+$dt0 = dt_from_string( '2012-01-01t23:59:59.999z', 'rfc3339' ); >+cmp_ok( $dt0->epoch(), 'eq', '1325462399', 'dt_from_string handles seconds with 3 decimal places' ); >+ >+$dt0 = dt_from_string( '2012-01-01T23:59:59.999Z+02:00', 'rfc3339' ); >+cmp_ok( $dt0->epoch(), 'eq', '1325462399', 'dt_from_string handles seconds with 3 decimal places and a timezone' ); > > # Return undef if passed mysql 0 dates > $dt0 = dt_from_string( '0000-00-00', 'iso' ); >-- >2.11.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 24643
:
98762
|
98763
|
98764
|
98780
|
98781
|
98825
|
98826
| 98827