[Affelio-cvs 1292] CVS update: affelio/lib/Affelio/App/Standalone

Back to archive index

Tadashi Okoshi slash****@users*****
2006年 5月 29日 (月) 21:08:49 JST


Index: affelio/lib/Affelio/App/Standalone/MyNewsRoutines.pm
diff -u affelio/lib/Affelio/App/Standalone/MyNewsRoutines.pm:1.3 affelio/lib/Affelio/App/Standalone/MyNewsRoutines.pm:1.4
--- affelio/lib/Affelio/App/Standalone/MyNewsRoutines.pm:1.3	Tue May 23 14:56:59 2006
+++ affelio/lib/Affelio/App/Standalone/MyNewsRoutines.pm	Mon May 29 21:08:49 2006
@@ -14,7 +14,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
-# $Id: MyNewsRoutines.pm,v 1.3 2006/05/23 05:56:59 higefuku Exp $
+# $Id: MyNewsRoutines.pm,v 1.4 2006/05/29 12:08:49 slash5234 Exp $
 
 package Affelio::App::Standalone::MyNewsRoutines;
 {
@@ -70,11 +70,18 @@
 	my @row=();
 	my $count=0;
 	while((@row = $news->fetchrow_array) && ($count < 10)){
-#	    my ($sec, $min, $hour, $mday, $mon, $year) = localtime($row[1]);
-#	    $mon+=1;
-#	    $year+=1900;
-#	    push(@ret_list, {date => "$year/$mon/$mday $hour:$min",
-	    push(@ret_list, {date => timestamp2stringB($row[1]),
+
+	    ### If datetime is using format of SQL DATETIME type,
+	    ### we don't do anything. Otherwise (older version),
+	    ### we translate integer value to YY/MM/HH style.
+	    my $datetime="";
+	    if($row[1]=~/:/){
+		$datetime= $row[1];
+	    }else{
+		$datetime = timestamp2stringB($row[1]);
+	    }
+
+	    push(@ret_list, {date => $datetime,
 			     app => $row[2],
 			     title => $row[3],
 			     url => $row[6]});


Affelio-cvs メーリングリストの案内
Back to archive index