Changeset 268

Show
Ignore:
Timestamp:
09/19/2006 07:36:23 PM
Author:
shiva
Message:

Increase timestamp tolerance to 72 hours. Order multiple results by difference in time (patch from Dukhat).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Ken/restore-widetime/script/vss2svn.pl

    r264 r268  
    534534    # on physname, actiontype, timestamp, and author gets us close. The problem 
    535535    # is that the "two" actions may not have happened in the exact same second, 
    536     # so we need to also look for any that are up to two seconds apart and hope 
     536    # so we need to also look for any that are some time apart and hope 
    537537    # we don't get the wrong row. 
    538538 
     
    548548    AND physname = ? 
    549549    AND actiontype = ? 
    550     AND (ABS(? - timestamp) < 21600) 
     550    AND (ABS(? - timestamp) < 259200) 
    551551    AND author = ? 
    552552ORDER BY 
    553     timestamp 
    554 EOSQL 
    555  
    556     # timestamp test is within 21600 seconds equals 6 hours (allows for 
     553    ABS(? - timestamp) 
     554EOSQL 
     555 
     556    # timestamp test is within 72 hours (empirical, allows for 
    557557    # really bad Windows clocks, timezones, and WAN delays) 
    558558    my $sth = $gCfg{dbh}->prepare($sql); 
    559     $sth->execute( $parentdata, @{ $parentrec }{qw(physname actiontype timestamp author)} ); 
     559    $sth->execute( $parentdata, @{ $parentrec }{qw(physname actiontype timestamp author timestamp)} ); 
    560560 
    561561    return $sth->fetchall_arrayref( {} ); 

These ads are automatically generated by Google based on the content of this page. Revenue from these ads helps to pay for hosting fees of this site; however, these ads do not constitute an endorsement by PumaCode.org.