From 9098ca852cd77bb2b3e78b9e7718d5d6bf7b6067 Mon Sep 17 00:00:00 2001 From: dpavlin Date: Fri, 9 Dec 2005 12:49:55 +0000 Subject: [PATCH] check daylight saving time offset when reading from database too. git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@246 8392b6e1-25fa-0310-8288-cc32f8e212ea --- bin/BackupPC_updatedb | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/bin/BackupPC_updatedb b/bin/BackupPC_updatedb index 97811b8..233f4ee 100755 --- a/bin/BackupPC_updatedb +++ b/bin/BackupPC_updatedb @@ -16,6 +16,9 @@ use BackupPC::SearchLib; use constant BPC_FTYPE_DIR => 5; use constant EST_CHUNK => 100000; +# daylight saving time change offset for 1h +my $dst_offset = 60 * 60; + my $debug = 0; $|=1; @@ -50,9 +53,9 @@ my $dbh = DBI->connect($dsn, $user, "", { RaiseError => 1, AutoCommit => 0 }); my %opt; -if ( !getopts("cdm:v:ij", \%opt ) ) { +if ( !getopts("cdm:v:ijf", \%opt ) ) { print STDERR <{file_in_db}->execute(@param); my $rows = $sth->{file_in_db}->rows; print STDERR "## found_in_db($shareID,$path,$date,$size) ",( $rows ? '+' : '-' ), join(" ",@param), "\n" if ($debug >= 3); @@ -643,9 +653,6 @@ sub recurseDir($$$$$$$$) { $filesInBackup->{$path_key}->{'size'} )); - # daylight saving time change offset for 1h - my $dst_offset = 60 * 60; - my $key_dst_prev = join(" ", ( $shareID, $dir, -- 2.20.1