Skip to content
Snippets Groups Projects
Commit 0a0ba2ff authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Print leading zeroes in dates and times!

parent b28ac7df
No related branches found
No related tags found
No related merge requests found
/* /*
* $Id: log.c,v 0.4 1992/08/12 04:11:56 ceder Exp $ * $Id: log.c,v 0.5 1992/08/12 04:43:17 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association. * Copyright (C) 1991 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* File created by ceder 1990-05-25. * File created by ceder 1990-05-25.
*/ */
static char *rcsid = "$Id: log.c,v 0.4 1992/08/12 04:11:56 ceder Exp $"; static char *rcsid = "$Id: log.c,v 0.5 1992/08/12 04:43:17 ceder Exp $";
#include <stdarg.h> #include <stdarg.h>
...@@ -61,7 +61,7 @@ logv (const char *format, va_list AP) ...@@ -61,7 +61,7 @@ logv (const char *format, va_list AP)
time(&clock); time(&clock);
t = localtime(&clock); t = localtime(&clock);
fprintf(stderr, "%4d-%2d-%2d %2d:%2d:%2d ", fprintf(stderr, "%04d-%02d-%02d %02d:%02d:%02d ",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec); t->tm_hour, t->tm_min, t->tm_sec);
vfprintf(stderr, format, AP); vfprintf(stderr, format, AP);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment