diff --git a/reactos/lib/msvcrt/time/time.c b/reactos/lib/msvcrt/time/time.c index 917ee9a60bb..6b0da0baca2 100644 --- a/reactos/lib/msvcrt/time/time.c +++ b/reactos/lib/msvcrt/time/time.c @@ -26,8 +26,12 @@ time(time_t *t) { FILETIME SystemTime; DWORD Remainder; + time_t tt; GetSystemTimeAsFileTime(&SystemTime); - return FileTimeToUnixTime( &SystemTime,&Remainder ); + tt = FileTimeToUnixTime( &SystemTime,&Remainder ); + if (t) + *t = tt; + return tt; } /***********************************************************************