[Ttssh2-commit] [3858] filestatのタイムスタンプのフォーマットを変更した。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 4月 13日 (火) 00:53:16 JST


Revision: 3858
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3858
Author:   yutakapon
Date:     2010-04-13 00:53:16 +0900 (Tue, 13 Apr 2010)

Log Message:
-----------
filestatのタイムスタンプのフォーマットを変更した。
cf.
http://logmett.com/forum/viewtopic.php?f=6&t=1357

Modified Paths:
--------------
    trunk/teraterm/ttpmacro/ttl.c


-------------- next part --------------
Modified: trunk/teraterm/ttpmacro/ttl.c
===================================================================
--- trunk/teraterm/ttpmacro/ttl.c	2010-04-12 14:47:54 UTC (rev 3857)
+++ trunk/teraterm/ttpmacro/ttl.c	2010-04-12 15:53:16 UTC (rev 3858)
@@ -1367,6 +1367,7 @@
 	struct _stat st;
 	int ret;
 	int result = -1;
+	struct tm *tmp;
 
 	Err = 0;
 	GetStrVal(FName,&Err);
@@ -1393,7 +1394,8 @@
 	if (CheckParameterGiven()) { 
 		GetStrVar(&TimeVarId,&Err);
 		if (Err!=0) return Err;
-		ctime_s(TimeStr, sizeof(TimeStr), &st.st_mtime);
+		tmp = localtime(&st.st_mtime);
+		strftime(TimeStr, sizeof(TimeStr), "%Y-%m-%d %H:%M:%S", tmp);
 		SetStrVal(TimeVarId, TimeStr);
 	}
 



Ttssh2-commit メーリングリストの案内
Back to archive index