Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 17CB59610 for ; Thu, 12 Apr 2012 12:48:17 +0000 (UTC) Received: (qmail 43539 invoked by uid 500); 12 Apr 2012 12:48:16 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 43490 invoked by uid 500); 12 Apr 2012 12:48:16 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 43483 invoked by uid 99); 12 Apr 2012 12:48:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 12:48:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 12:48:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7098C2388847; Thu, 12 Apr 2012 12:47:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1325227 - /httpd/httpd/trunk/support/log_server_status.in Date: Thu, 12 Apr 2012 12:47:53 -0000 To: cvs@httpd.apache.org From: rbowen@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120412124753.7098C2388847@eris.apache.org> Author: rbowen Date: Thu Apr 12 12:47:53 2012 New Revision: 1325227 URL: http://svn.apache.org/viewvc?rev=1325227&view=rev Log: Removes calls to `date`. Modified: httpd/httpd/trunk/support/log_server_status.in Modified: httpd/httpd/trunk/support/log_server_status.in URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/log_server_status.in?rev=1325227&r1=1325226&r2=1325227&view=diff ============================================================================== --- httpd/httpd/trunk/support/log_server_status.in (original) +++ httpd/httpd/trunk/support/log_server_status.in Thu Apr 12 12:47:53 2012 @@ -55,12 +55,18 @@ sub tcp_connect ### Main { - my $year = `date +%y`; - chomp($year); - $year += ( $year < 70 ) ? 2000 : 1900; - my $date = $year . `date +%m%d:%H%M%S`; - chomp($date); - my ( $day, $time ) = split( /:/, $date ); + my @ltime = localtime(time); + + my $day = + $ltime[5] + 1900 + . sprintf( "%02d", $ltime[4] + 1 ) + . sprintf( "%02d", $ltime[3] ); + + my $time = + sprintf( "%02d", $ltime[2] ) + . sprintf( "%02d", $ltime[1] ) + . sprintf( "%02d", $ltime[0] ); + my $res = &tcp_connect( $server, $port ); open( OUT, ">>$wherelog$day" );