sort files by date and cludge (hard-coded mess) to make TZ +1
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sun, 21 Aug 2005 17:08:55 +0000 (17:08 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sun, 21 Aug 2005 17:08:55 +0000 (17:08 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@64 8392b6e1-25fa-0310-8288-cc32f8e212ea

lib/BackupPC/SearchLib.pm

index 14f02ee..b9481f9 100644 (file)
@@ -32,6 +32,7 @@ sub getUnits() {
 
 sub epoch_to_iso {
        my $t = shift || return;
+       $t += 60 * 60 * +2;     # FIXME add TZ
        my $dt = DateTime->from_epoch( epoch => $t ) || return;
        print STDERR "BUG: $t != " . $dt->epoch . "\n" unless ($t == $dt->epoch);
        return $dt->ymd . ' ' . $dt->hms;
@@ -115,7 +116,7 @@ sub getFiles($$) {
        $sql_where = " WHERE ". $where if ($where);
 
        my $sql_order = qq{
-               ORDER BY files.id
+               ORDER BY files.date
                LIMIT $on_page
                OFFSET ?
        };