X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/72b364a8a94e6c1f60c43aaef2f7c187b44f7d56..aca589d972c5c12706d57322e89f9dec2b2a3a00:/logging.c diff --git a/logging.c b/logging.c index 808e429f..f1c42cde 100644 --- a/logging.c +++ b/logging.c @@ -169,7 +169,6 @@ void logfopen(void *handle) { struct LogContext *ctx = (struct LogContext *)handle; char buf[256]; - time_t t; struct tm tm; char writemod[4]; @@ -181,8 +180,7 @@ void logfopen(void *handle) return; sprintf(writemod, "wb"); /* default to rewrite */ - time(&t); - tm = *localtime(&t); + tm = ltime(); /* substitute special codes in file name */ xlatlognam(&ctx->currlogfilename, ctx->cfg.logfilename,ctx->cfg.host, &tm);