ÃÑ ÆäÀÌÁö ¼ö : 3224
![]()
|
Facebook Joinc ±×·ì
Joinc QA »çÀÌÆ®
![]()
Tweet
joinc´Â Firefox¿Í chrome¿¡¼ Å×½ºÆ® Çß½À´Ï´Ù. IE¿¡¼´Â Å×À̺íÀÌ ±úÁö°Å³ª À̹ÌÁö°¡ º¸ÀÌÁö ¾ÊÀ» ¼ö ÀÖ½À´Ï´Ù. ƯÈ÷ ±¸±Û DocsÀ̹ÌÁöÀÇ °æ¿ì ¿¢¹Úó¸®µÉ ¼ö ÀÖ½À´Ï´Ù. mktime
Unix Time ½Ã°£À» °¡Á®¿Â´Ù. »ç¿ë¹ý#include <time.h> time_t mktime(struct tm *tm); ¼³¸í
mktime ÇÔ¼ö´Â ÀÎÀÚ·Î ¹ÞÀº ½Ã°£ ±¸Á¶Ã¼ timeptrÀÇ °ªÀ» Unix Time ½Ã°£À¸·Î º¯°æ½ÃŲ´Ù.
struct tm ±¸Á¶Ã¼ÀÇ ¿øÇüÀÌ´Ù. struct tm {
int tm_sec; /* seconds */
int tm_min; /* minutes */
int tm_hour; /* hours */
int tm_mday; /* day of the month */
int tm_mon; /* month */
int tm_year; /* year */
int tm_wday; /* day of the week */
int tm_yday; /* day in the year */
int tm_isdst; /* daylight saving time */
};
tm ±¸Á¶Ã¼ÀÇ ¸â¹öº¯¼ö¿¡ ´ëÇÑ ¼³¸íÀÌ´Ù.
¿¹Á¦#include <time.h> #include <stdio.h> #include <unistd.h> #include <sys/types.h> int main() { struct tm tm_ptr; time_t the_time; int i; // 2002³â 2¿ù 8ÀÏ 23½Ã 50ºÐ 50ÃÊ ¿¡ ´ëÇÑ // Unix Time ¸¦ µÇµ¹·ÁÁØ´Ù. tm_ptr.tm_year = 102; // 2002 - 1900 tm_ptr.tm_mon = 1; // 2 - 1 tm_ptr.tm_mday = 8; tm_ptr.tm_hour = 23; tm_ptr.tm_min = 50; tm_ptr.tm_sec = 50; printf("%d\n", mktime(&tm_ptr)); } |
|
|
EmailÀ» ±âÀÔÇϸé, ´ñ±ÛÀÌ ¸ÞÀÏ·Î Àü´ÞµË´Ï´Ù. |
|