diff options
| author | 2012-01-09 22:02:59 +0000 | |
|---|---|---|
| committer | 2012-01-09 22:02:59 +0000 | |
| commit | 916d63f9bbe2d295cc195859e83ba52d17954af3 (patch) | |
| tree | e42a006b4d7db2b705ef11b5925a43c9c57241cc /src/modules/file/libkvifile.cpp | |
| parent | hopefully fixed win32 compilation (diff) | |
| download | KVIrc-916d63f9bbe2d295cc195859e83ba52d17954af3.tar.gz KVIrc-916d63f9bbe2d295cc195859e83ba52d17954af3.tar.bz2 KVIrc-916d63f9bbe2d295cc195859e83ba52d17954af3.zip | |
quick fix
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6045 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/file/libkvifile.cpp')
| -rw-r--r-- | src/modules/file/libkvifile.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/file/libkvifile.cpp b/src/modules/file/libkvifile.cpp index 728ccf610..b29a712bf 100644 --- a/src/modules/file/libkvifile.cpp +++ b/src/modules/file/libkvifile.cpp @@ -1523,16 +1523,16 @@ static bool file_kvs_fnc_digest(KviKvsModuleFunctionCall * c) @title: $file.time @short: - Returns the datetime of a file + Returns the datetime of a file in unixtime format @syntax: - <string> $file.time(<file path:string>[,<time type:string>]) + <integer> $file.time(<file path:string>[,<time type:string>]) @description: - Returns the datetime of a file.[br] + Returns the datetime of a file as the number of milliseconds that have passed since 1970-01-01T00:00:00.000, Coordinated Universal Time (UTC).[br] The path should be given in UNIX-style and is adjusted according to the system that KVIrc is running on.[br] The type have to be:[br] "a" to retrieve the last time the file was accessed;[br] "c" to retrieve the creation time of the file (on most UNIX systems, when the creation time or the last status change time - e.g. changing file permissions - are not available, it will fallback to "m";[br] - "m" to retrieve the time of the last modification of the file. This is the default + "m" to retrieve the time of the last modification of the file. This is the default. @examples: [example] # Windows @@ -1573,7 +1573,8 @@ static bool file_kvs_fnc_time(KviKvsModuleFunctionCall * c) time = f.lastModified(); } - c->returnValue()->setString(time.toString("yyyy-MM-dd hh:mm")); + c->returnValue()->setInteger(time.toMSecsSinceEpoch()); + return true; } |
