added a time stamp argument to FormatTime
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401047
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ static cell_t FormatTime(IPluginContext *pContext, const cell_t *params)
|
||||
pContext->LocalToString(params[1], &buffer);
|
||||
pContext->LocalToString(params[3], &format);
|
||||
|
||||
time_t t = time(NULL);
|
||||
time_t t = (params[4] == -1) ? time(NULL) : (time_t)params[4];
|
||||
strftime(buffer, params[2], format, localtime(&t));
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user