ldap/admin/src/scripts/repl-monitor.pl.in | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 77e6044ee5e44fa86e44280d46f36d63a30458b0
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Thu May 12 16:10:02 2016 -0400
Ticket 48220 - The "repl-monitor" web page does not display "year"
in date.
Bug Description: The year is not displayed in the header when the day
is less than 10. Appears to be an issue with localtime().
Fix Description: Instead of strftime for displaying the date.
https://fedorahosted.org/389/ticket/48220
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in
b/ldap/admin/src/scripts/repl-monitor.pl.in
index a670610..0964ae0 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -166,6 +166,7 @@ use Mozilla::LDAP::Conn; # LDAP module for Perl
use Mozilla::LDAP::Utils qw(normalizeDN); # LULU, utilities.
use Mozilla::LDAP::API qw(:api :ssl :apiv3 :constant); # Direct access to C API
use Time::Local; # to convert GMT Z strings to localtime
+use POSIX;
#
# Global variables
@@ -206,7 +207,7 @@ my %ld;
my ($opt_f, $opt_h, $opt_p, $opt_u, $opt_t, $opt_r, $opt_s);
my (@conns, @alias, @color);
-my ($section, $interval, $nowraw, $now, $mm, $dd, $tt, $yy, $wday);
+my ($section, $interval, $now, $mm, $dd, $tt, $yy, $wday);
my ($fn, $rc, $prompt, $last_sidx);
my $supplierUrl = "";
my %passwords = ();
@@ -242,9 +243,7 @@ $prompt = "";
$interval = 300 if ( !$interval || $interval <= 0 );
# Get current date/time
- $nowraw = localtime();
- ($wday, $mm, $dd, $tt, $yy) = split(/ /, $nowraw);
- $now = "$wday $mm $dd $yy $tt";
+ $now = strftime "%a %b %e %Y %H:%M:%S", localtime;
# if no -r (Reenter and skip html header), print html header
if (!$opt_r) {