Help for this page

Select Code to Download


  1. or download this
    #Convert Apache logfile time to unix epoch seconds
    #The only real limitation here is that we MUST stay in the same
    #timezone as the originating writer, that is, this doesn't support
    #variable timezones.  However, it IS three times as fast as
    # Time::ParseDate's parsedate() function.
    
  2. or download this
    sub apache2epoch
    {
    ...
     $_[0] =~ m((\d+)/(\w+)/(\d+):(\d+):(\d+):(\d+));
     return &mktime($6,$5,$4,$1,$months{$2},$3-1900,0,0,-1);
    }