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