Correct use of localtime() in Win32