The problem with time in Win32 is with time_t type, it is 64bit integer so as we used to treat time_t as 32bit most of the software especially sprintf-like function will make the server to crash. Try using %T and even that crashes nsd.exe when i compiled using VC++.