X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/19fe6b99408a97e6a79b2a79b405bf7923c08e80..eb5d6b73587847fd4a98767248c56ae9b854c1d2:/src/tools.c diff --git a/src/tools.c b/src/tools.c index ecfdc1e..2911508 100644 --- a/src/tools.c +++ b/src/tools.c @@ -952,3 +952,13 @@ char *mysep(char **sepstr, char *delim) return(retstr); } +char *time2str(time_t thetime) +{ + char *buf, *tmp; + + buf = ctime(&thetime); + tmp = (char *)strchr(buf, '\n'); + *tmp = '\0'; + return(buf); +} +