Bugzilla – Attachment 62516 Details for
Bug 18299
Removal of admin/env_tz_test.pl script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18299 - Implemented new locatime function to compare against the value of the output of the get_current_time() function
Bug-18299---Implemented-new-locatime-function-to-c.patch (text/plain), 1.21 KB, created by
Marc Véron
on 2017-04-21 04:58:37 UTC
(
hide
)
Description:
Bug 18299 - Implemented new locatime function to compare against the value of the output of the get_current_time() function
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-04-21 04:58:37 UTC
Size:
1.21 KB
patch
obsolete
>From 399854630cb09ae999f3d061f4e51208e171cbd9 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 21 Apr 2017 12:56:23 +1200 >Subject: [PATCH] Bug 18299 - Implemented new locatime function to compare > against the value of the output of the get_current_time() function >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > t/db_dependent/Context.t | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Context.t b/t/db_dependent/Context.t >index d36c106..dfc1646 100755 >--- a/t/db_dependent/Context.t >+++ b/t/db_dependent/Context.t >@@ -150,10 +150,9 @@ sub get_current_time { > $sth->execute(); > return $sth->fetchrow_array;# Return a time value rather than hash value > } >-my $datetime = DateTime->now; >-my $date = $datetime->ymd; >-my $time = $datetime->hms; >-my $compardt = "$date $time"; >+ >+my ($second,$min,$hour,$mday,$month,$year,$weekday,$yday,$isdst) = localtime(time); >+my $compardt = sprintf("%04d-%02d-%02d %02d:%02d:%02d", $year+1900, $month+1, $mday, $hour, $min, $second); > > my $current_time = get_current_time(); > is($current_time, $compardt, "Correct time"); >-- >2.1.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 18299
:
61238
|
62510
|
62515
|
62516
|
62996
|
63001
|
63042