· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Windows Timestamp ¸¦ Unix Timestamp ·Î º¯È¯



1. °³¿ä

  1. windows ¿Í unix °£ÀÇ data Åë½Å ½Ã¿¡, »óÈ£ timestamp ü°è°¡ ´Ù¸¥ ¹®Á¦¸¦ ÇØ°áÇϱâ À§ÇÑ ½Ãµµ
  2. Windows Time Stamp
    • 1601³â 1¿ù 1ÀÏ 0½Ã¸¦ ±âÁØÀ¸·Î ÇöÀç±îÁöÀÇ ½Ã°£À» 100³ª³ë ÃʷΠǥ±â
    • 64bit Á¤¼ö·Î Ç¥Çö
  3. Unix Time Stamp
    • 1970³â 1¿ù 1ÀÏ 0½Ã¸¦ ±âÁØÀ¸·Î ÇöÀç±îÁöÀÇ ½Ã°£À» ÃʷΠǥ±â
  4. µÎ ½Ã°£ÀÇ ±âÁØÀº UTC ÀÓ

2. Windows time to unix time

uint64_t win2unix_stamp (uint64_t stamp)
{  
  /*
   * Start of Unix time stamp is 1970/01/01 00:00 (UTF),
   * and, windows time stamp of this is 116444736000000000
   */
  uint64_t unix_def_stamp = 11644473600;
  return (stamp / 10000000) - unix_def_stamp;
}


3. Unix time convert windows time

uint64_t unix2win_stamp (uint32_t stamp)
{  
  uint64_t unix_def_stamp = 116444736000000000;
  return (stamp * 10000000) + unix_def_stamp;
}

ID
Password
Join
You will be honored for contributing your time and skill to a worthy cause.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-03-19 23:21:14
Processing time 0.0037 sec