dede 採集到資料後,釋出日期變為本地日期解決方法
阿新 • • 發佈:2018-11-11
找到dede目錄下的co_export.php
大概在170行左右
1 //獲取時間和標題 2 $pubdate = $sortrank = time(); 3 $title = $row->title; 4 $litpic = ''; 5 foreach ($dtp->CTags as $ctag) 6 { 7 $itemName = $ctag->GetAtt('name'); 8 if($itemName == 'title' && $usetitle==0) 9 { 10 $title = trim($ctag->GetInnerText()); 11 if($title=='') 12 { 13 $title = $row->title; 14 } 15 } 16 else if($itemName == 'pubdate') 17 { 18 $pubdate= trim($ctag->GetInnerText()); 19 if(preg_match("#[^0-9]#", $pubdate)) 20 { 21 $pubdate = $sortrank = GetMkTime($pubdate); 22 } 23 // else //將註釋部分刪掉即可,共4行 24 // { 25 // $pubdate = $sortrank = time();26 // } 27 } 28 else if($itemName == 'litpic') 29 { 30 $litpic = trim($ctag->GetInnerText()); 31 } 32 }