Changeset 914

Show
Ignore:
Timestamp:
06/07/06 15:26:35
Author:
miyagawa
Message:

MixidiarySearch?: don't create new Feed object. fix floating TZ first

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/CustomFeed/MixiDiarySearch.pm

    r907 r914  
    4545    my %query = URI->new($url)->query_form; 
    4646 
    47     my $feed = Plagger::Feed->new
     47    my $feed = $args->{feed}
    4848    $feed->title("mixi: Search for $query{keyword}"); 
    4949    $feed->link($url); 
     
    8686        $data->{date} = Plagger::Date->strptime($date_format, "$current $data->{date}"); 
    8787 
     88        $data->{date}->set_time_zone('Asia/Tokyo'); # set floating datetime 
     89 
    8890        # one year ago, if the parsed datetime is in the future 
    8991        if ($data->{date} > $now) { 
    90             $data->{date}->subtract(year => 1); 
     92            $data->{date}->subtract(years => 1); 
    9193        } 
    9294 
    93         $data->{date}->set_time_zone('Asia/Tokyo'); # set floating datetime 
    9495        $data->{date}->set_time_zone(Plagger->context->conf->{timezone} || 'local'); 
    9596