[SCM] Interchange branch, master, updated. 2ced36a3c2e651194bdb1a352727f834eeae8fee

Peter Ajamian <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange".

The branch, master has been updated
       via  2ced36a3c2e651194bdb1a352727f834eeae8fee (commit)
      from  b0f731a99f5a22136c0b1520b11f02ec74777cf9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2ced36a3c2e651194bdb1a352727f834eeae8fee
Author: Peter Ajamian <[email protected]>
Date:   Sun Sep 13 13:49:50 2009 -0700

    Remove bloat that duplicates %z functionality.
    
    On 09/12/2009 09:26 PM, Mike Heins wrote:
    > Quoting Peter ([email protected]):
    >> Incidentally why the mess of code in Util.pm to get the same result that
    >> %z would give anyways?
    >
    > Probably because I was stupid when I wrote it, and didn't understand what
    > %z did. Or I did it before %z became standard.
    >
    > It should be changed.

-----------------------------------------------------------------------

Summary of changes and diff:
 lib/Vend/Util.pm |   23 +----------------------
 1 files changed, 1 insertions(+), 22 deletions(-)

diff --git a/lib/Vend/Util.pm b/lib/Vend/Util.pm
index f3bee42..201453e 100644
--- a/lib/Vend/Util.pm
+++ b/lib/Vend/Util.pm
@@ -206,30 +206,9 @@ sub tabbed {
                           } @_);
 }
 
-# Finds common-log-style offset
-# Unproven, authoratative code welcome
-my $Offset;
-FINDOFFSET: {
-    my $now = time;
-    my ($gm,$gh,$gd,$gy) = (gmtime($now))[1,2,5,7];
-    my ($lm,$lh,$ld,$ly) = (localtime($now))[1,2,5,7];
-    if($gy != $ly) {
-        $gy < $ly ? $lh += 24 : $gh += 24;
-    }
-    elsif($gd != $ld) {
-        $gd < $ld ? $lh += 24 : $gh += 24;
-    }
-    $gh *= 100;
-    $lh *= 100;
-    $gh += $gm;
-    $lh += $lm;
-    $Offset = sprintf("%05d", $lh - $gh);
-    $Offset =~ s/0(\d\d\d\d)/+$1/;
-}
-
 # Returns time in HTTP common log format
 sub logtime {
-    return POSIX::strftime("[%d/%B/%Y:%H:%M:%S $Offset]", localtime());
+    return POSIX::strftime("[%d/%B/%Y:%H:%M:%S %z]", localtime());
 }
 
 sub format_log_msg {


hooks/post-receive
-- 
Interchange
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.