aboutsummaryrefslogtreecommitdiff
path: root/plugins-scripts/check_uptime.pl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/check_uptime.pl')
-rwxr-xr-xplugins-scripts/check_uptime.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins-scripts/check_uptime.pl b/plugins-scripts/check_uptime.pl
index 0a13cc0e..ed859ab3 100755
--- a/plugins-scripts/check_uptime.pl
+++ b/plugins-scripts/check_uptime.pl
@@ -143,7 +143,7 @@ $msg .= "uptime is $uptime_seconds seconds. ";
$msg .= "Exceeds $out_of_bounds_text threshold. " if $out_of_bounds_text;
$msg .= "Running for $pretty_uptime. " if $opt_f;
if ( $opt_s ) {
- chomp( my $up_since = `uptime -s` );
+ my $up_since = strftime( "%Y-%m-%d %H:%M:%S", localtime( time - $uptime_seconds ) );
$msg .= "Running since $up_since. ";
}