X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/5d17ccfcfb6aaa0fe7b3fb1d90ffde20a1013cc1..d6214a563632bb2c0d92d1e31dfea02880d97600:/windows/winpgen.c?ds=sidebyside diff --git a/windows/winpgen.c b/windows/winpgen.c index e80dbfec..7772f55a 100644 --- a/windows/winpgen.c +++ b/windows/winpgen.c @@ -1279,14 +1279,12 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg, */ *state->commentptr = snewn(30, char); { - time_t t; - struct tm *tm; - time(&t); - tm = localtime(&t); + struct tm tm; + tm = ltime(); if (state->is_dsa) - strftime(*state->commentptr, 30, "dsa-key-%Y%m%d", tm); + strftime(*state->commentptr, 30, "dsa-key-%Y%m%d", &tm); else - strftime(*state->commentptr, 30, "rsa-key-%Y%m%d", tm); + strftime(*state->commentptr, 30, "rsa-key-%Y%m%d", &tm); } /*