Changeset 559 in ProjectBuilder for devel/pb/bin/pb


Ignore:
Timestamp:
Sep 27, 2008, 6:56:09 PM (16 years ago)
Author:
Bruno Cornec
Message:

web2ssh is now producing a correct tar file, as well as generated news files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r557 r559  
    718718            # Instead call News generation
    719719            pb_web_news2html($dest);
     720            # And create an empty pbconf
     721            pb_mkdir_p("$dest/pbconf");
    720722        }
    721723
     
    21702172    # For date handling
    21712173    $ENV{LANGUAGE}="C";
    2172     my $firstjan = strftime("%Y-%m-%d", 0, 0, 1, 1, localtime->year(), 0, 0, -1);
    2173     my $oldfirst = strftime("%Y-%m-%d", 0, 0, 1, 1, localtime->year()-1, 0, 0, -1);
     2174    my $firstjan = strftime("%Y-%m-%d", 0, 0, 0, 1, 0, localtime->year(), 0, 0, -1);
     2175    my $oldfirst = strftime("%Y-%m-%d", 0, 0, 0, 1, 0, localtime->year()-1, 0, 0, -1);
     2176    pb_log(2,"firstjan: $firstjan, oldfirst: $oldfirst, pbdate:$pbdate\n");
    21742177    my $all = $dbh->selectall_arrayref("SELECT id,date,announce FROM announces ORDER BY date DESC");
    21752178    my %news;
     
    21822185    foreach my $row (@$all) {
    21832186        my ($id, $date, $announce) = @$row;
    2184         $news{"cy"} = $news{"cy"}."<p><B>$date</B> $announce\n" if (("$date" le $pbdate) && ($firstjan le "$date"));
    2185         $news{"ly"} = $news{"ly"}."<p><B>$date</B> $announce\n" if (("$date" le $firstjan) && ($oldfirst le "$date"));
    2186         $news{"py"} = $news{"py"}."<p><B>$date</B> $announce\n" if ("$date" le $oldfirst);
     2187        $news{"cy"} = $news{"cy"}."<p><B>$date</B> $announce\n" if ((($date cmp $pbdate) le 0) && (($firstjan cmp $date) le 0));
     2188        $news{"ly"} = $news{"ly"}."<p><B>$date</B> $announce\n" if ((($date cmp $firstjan) le 0) && (($oldfirst cmp $date) le 0));
     2189        $news{"py"} = $news{"py"}."<p><B>$date</B> $announce\n" if (($date cmp $oldfirst) le 0);
    21872190        $news{"fp"} = $news{"fp"}."<p><B>$date</B> $announce\n" if ($cpt > 0);
    21882191        $cpt--;
Note: See TracChangeset for help on using the changeset viewer.