??? UNIX time_t Win32 FILETIME ?? SYSTEMTIME ??? ?????? ???? ????

???? ?????? ???? ??????
???? ID: 167296 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

??????

UNIX ????????????, ?? ??????? ????? ??? ???? ANSI C ?????? ??????? ?????? 'time_t', midnight ????? 1, 1970 UTC (??????? ??????? ???) ?? ??? ????? ?? ???????????? ???? ?? ?????? ??? ?? ??? ??? ???? ???

Win32 ????????????, ?? ??????? ????? ??? ?? 64-??? FILETIME ??????, ?? ?????? ????? 1, 1601 UTC ?? ??? 100-nanosecond ?????? (coordinate ??????? ???) ?? ???????????? ???? ?? ?? ?? ??? ??? ??????? ???? ????

?? ???? UNIX ??? ???? Win32 ??? ?????? ??? ?????? ???? ?? ??? ???? ?????? ???

???? ???????

????? ????? ???? ?? ??? ?? Win32 FILETIME ?????? ?? filetime UNIX time_t ?????? ??? ?????? ???? ??? ????? ??? ?? time_t 32-??? ??? ?? ?? FILETIME ?? 64-??? ??????, ????? Win32 ??????, Int32x32To64() ????? ????? ???? ??? ????? ???? ???? ??:
   #include <winbase.h>
   #include <winnt.h>
   #include <time.h>

   void UnixTimeToFileTime(time_t t, LPFILETIME pft)
   {
     // Note that LONGLONG is a 64-bit value
     LONGLONG ll;

     ll = Int32x32To64(t, 10000000) + 116444736000000000;
     pft->dwLowDateTime = (DWORD)ll;
     pft->dwHighDateTime = ll >> 32;
   }
				
UNIX ??? ??? ?? FILETIME ?????? ??? ?????? ???? ??, ?? ??? ???? Win32 ??? ?????? ???? ????? ?? ??????? ?? ?? ???? FileTimeToSystemTime() ?? FileTimeToDosDateTime() Win32 ?????? ?? ????? ?????
   void UnixTimeToSystemTime(time_t t, LPSYSTEMTIME pst)
   {
     FILETIME ft;

     UnixTimeToFileTime(t, &ft);
     FileTimeToSystemTime(&ft, pst);
   }
				

???

???? ID: 167296 - ????? ???????: 02 ?????? 2010 - ??????: 4.0
???? ???? ???? ??:
  • Microsoft Win32 Application Programming Interface, ?? ???? ??? ?????? ???? ???:
    • Microsoft Windows 98 Standard Edition
    • Microsoft Windows Millennium Edition
??????: 
kbdatetime kbhowto kbkernbase kbprogramming kbmt KB167296 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:167296

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com