directly use time_t in botlib

This commit is contained in:
Jonathan Gray 2013-04-26 17:31:28 +10:00
parent 1660a3ca25
commit ce76dab7de

View file

@ -706,7 +706,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
token_t **firsttoken, token_t **lasttoken)
{
token_t *token;
unsigned long t; // time_t t; //to prevent LCC warning
time_t t;
char *curtime;
token = PC_CopyToken(deftoken);
@ -737,7 +737,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
case BUILTIN_DATE:
{
t = time(NULL);
curtime = ctime((const long *)&t);
curtime = ctime(&t);
strcpy(token->string, "\"");
strncat(token->string, curtime+4, 7);
strncat(token->string+7, curtime+20, 4);
@ -752,7 +752,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
case BUILTIN_TIME:
{
t = time(NULL);
curtime = ctime((const long *)&t);
curtime = ctime(&t);
strcpy(token->string, "\"");
strncat(token->string, curtime+11, 8);
strcat(token->string, "\"");