Changeset 948

Show
Ignore:
Timestamp:
06/09/06 21:44:42
Author:
miyagawa
Message:

fix date if it found true entry

Files:

Legend:

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

    r947 r948  
    7676        $entry->body( munge_body($data->{body}) ); 
    7777 
    78         warn $data->{link}; 
    7978        $feed->add_entry($entry); 
    8079    } 
     
    112111            # xxx I could update other metadata, but leave it for EntryFullText ... 
    113112            $data->{link} = "http://$server.2ch.net/test/read.cgi/$board/$thread/$id"; 
     113 
     114            if ($data[2] =~ m!^(\d{4}/\d\d/\d\d)\(.*?\) (\d\d:\d\d:\d\d)!) { 
     115                $data->{date} = Plagger::Date->strptime("%Y/%m/%d %H:%M:%S", "$1 $2"); 
     116                $data->{date}->set_time_zone('Asia/Tokyo'); # set floating datetime 
     117                $data->{date}->set_time_zone(Plagger->context->conf->{timezone} || 'local'); 
     118            } 
    114119            return; 
    115120        }