diff options
-rw-r--r-- | FICS/comproc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c index 4c157bb..53e9800 100644 --- a/FICS/comproc.c +++ b/FICS/comproc.c @@ -510,12 +510,15 @@ PUBLIC int com_uptime(int p, param_list param) return COM_OK; } -PUBLIC int com_date(int p, param_list param) +PUBLIC int +com_date(int p, param_list param) { - int t = time(0); - pprintf(p, "Local time - %s\n", strltime(&t)); - pprintf(p, "Greenwich time - %s\n", strgtime(&t)); - return COM_OK; + time_t t = time(NULL); + + pprintf(p, "Local time - %s\n", strltime(&t)); + pprintf(p, "Greenwich time - %s\n", strgtime(&t)); + + return COM_OK; } char *inout_string[] = { |