Bugzilla – Attachment 129470 Details for
Bug 29718
DateTime - our 'iso' is not ISO 8601
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29718: (QA follow-up) Remove duplicate test
Bug-29718-QA-follow-up-Remove-duplicate-test.patch (text/plain), 2.50 KB, created by
Marcel de Rooy
on 2022-01-14 09:37:21 UTC
(
hide
)
Description:
Bug 29718: (QA follow-up) Remove duplicate test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-01-14 09:37:21 UTC
Size:
2.50 KB
patch
obsolete
>From 844ac5111fc8bc85f3ddbd82e84d0348f9885996 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 13 Jan 2022 09:06:55 +0000 >Subject: [PATCH] Bug 29718: (QA follow-up) Remove duplicate test >Content-Type: text/plain; charset=utf-8 > >I'd inadvertantly introduced the exact same test twice! This patch >removes the duplicate and annotates the test to clarify the timezone >handling expectations. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/DateUtils.t | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/t/DateUtils.t b/t/DateUtils.t >index 96d9ed27b2..7cfa982187 100755 >--- a/t/DateUtils.t >+++ b/t/DateUtils.t >@@ -144,7 +144,7 @@ like( $@, qr/.*does not match the date format \(rfc3339\).*/, 'dt_from_string sh > > # ISO string tests > subtest 'dt_from_string - iso format' => sub { >- plan tests => 6; >+ plan tests => 5; > > my $module_context = Test::MockModule->new('C4::Context'); > $module_context->mock( >@@ -157,6 +157,7 @@ subtest 'dt_from_string - iso format' => sub { > # Dateonly > my $dt_iso = dt_from_string( '2012-01-01', 'iso' ); > cmp_ok( $dt_iso->epoch(), 'eq', '1325372400', 'dt_from_string handles dateonly string' ); >+ # Saturday December 31, 2011 23:00:00 (UTC) == Sunday January 01, 2012 00:00:00 Europe/Paris (CET/+01:00) > > eval { > $dt_iso = dt_from_string( '2012-01-32', 'iso' ); >@@ -166,17 +167,16 @@ subtest 'dt_from_string - iso format' => sub { > # Datetime > $dt_iso = dt_from_string( '2012-01-01T23:59:59', 'iso' ); > cmp_ok( $dt_iso->epoch(), 'eq', '1325458799', 'dt_from_string with no offset assumes "local"' ); >+ # Sunday January 01, 2012 22:59:59 (UTC) == Sunday January 01, 2012 23:59:59 Europe/Paris (CET/+01:00) > > # Datetime with timezone > $dt_iso = dt_from_string( '2012-01-01T23:59:59Z', 'iso' ); > cmp_ok( $dt_iso->epoch(), 'eq', '1325462399', 'dt_from_string with UTC prescribed as Z' ); >+ # Sunday January 01, 2012 23:59:59 (UTC) > > $dt_iso = dt_from_string( '2012-01-01T23:59:59+02:00', 'iso' ); > cmp_ok( $dt_iso->epoch(), 'eq', '1325455199', 'dt_from_string with offset' ); >- >- $dt_iso = dt_from_string( '2012-01-01T23:59:59+02:00', 'iso' ); >- cmp_ok( $dt_iso->epoch(), 'eq', '1325455199', 'dt_from_string handles an offset' ); >- >+ # Sunday January 01, 2012 21:59:59 (UTC) == Sunday January 01, 2012 23:59:59 Europe/Athens (EET/+02:00) > }; > > # Return undef if passed mysql 0 dates >-- >2.20.1
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 29718
:
128631
|
128653
|
128654
|
128658
|
128840
|
129372
|
129385
|
129386
|
129387
|
129388
|
129389
|
129390
|
129465
|
129466
|
129467
|
129468
|
129469
| 129470 |
129471