'개소리 왈왈 > 정치관련 신세한탄' 카테고리의 다른 글
| 공인인증서 하드에 저장 못하게 하면? (0) | 2010.01.15 |
|---|---|
| 내집앞에 눈을 안치우면 벌금 100만원? (7) | 2010.01.07 |
| 통신사 낙시질! (2) | 2009.12.07 |
| 기차표가 달라졌어요! (4) | 2009.12.06 |
| 싱가포르가 부럽다 (0) | 2009.11.20 |
| 공인인증서 하드에 저장 못하게 하면? (0) | 2010.01.15 |
|---|---|
| 내집앞에 눈을 안치우면 벌금 100만원? (7) | 2010.01.07 |
| 통신사 낙시질! (2) | 2009.12.07 |
| 기차표가 달라졌어요! (4) | 2009.12.06 |
| 싱가포르가 부럽다 (0) | 2009.11.20 |
| 미네랄! 2 (0) | 2009.12.15 |
|---|---|
| 뭥미 (0) | 2009.12.14 |
| 토익일정 (0) | 2009.12.06 |
| super battery (2) | 2009.12.04 |
| 오우 젠장! 내돈!!! (UVC for linux failed) (0) | 2009.12.03 |
| 고편평도 타이어 (2) | 2010.01.04 |
|---|---|
| 과냉각 / 유리 (0) | 2010.01.03 |
| up close and personal (0) | 2009.12.08 |
| 기믹(Gimmick) (0) | 2009.11.24 |
| 코드러너 - 웹에서 프로그래밍을! (0) | 2009.11.20 |
| 가시광선 영상, 적외선 영상, 열영상 (0) | 2018.02.06 |
|---|---|
| 열영상과 적외선 영상의 차이점 (0) | 2010.07.15 |
| 적외선 카메라 만들기 (8) | 2010.07.02 |
| 헉 하드가! (2) | 2009.12.30 |
|---|---|
| 늙어간다는 것은.. (4) | 2009.12.25 |
| 포맷은 주말에.... OTL (0) | 2009.07.02 |
| 간만에 지름신 - 하드를 질렀습니다!! (14) | 2009.07.01 |
| 문득 적어 보는 지름신 리스트 (16) | 2009.03.22 |
| 콘솔 터미널 탭사용하기 (0) | 2010.01.13 |
|---|---|
| 우분투 개발관련 패키지 (0) | 2009.12.26 |
| Xournal + CellWriter (4) | 2009.12.10 |
| Ubuntu 9.10 에서 프로그램 설치가 안될경우 (0) | 2009.12.09 |
| Ubuntu 9.10 만세 (4) | 2009.12.09 |

http://brucekim.egloos.com/2455400]| 우분투 개발관련 패키지 (0) | 2009.12.26 |
|---|---|
| TC1100에 우분투 설치 관련 문서 (6) | 2009.12.10 |
| Ubuntu 9.10 에서 프로그램 설치가 안될경우 (0) | 2009.12.09 |
| Ubuntu 9.10 만세 (4) | 2009.12.09 |
| 9.10 kalmic 업그레이드 / 맛배기 (0) | 2009.11.02 |
| #include <time.h> time_t time(time_t *t); size_t strftime(char *s, size_t max, const char *format, const struct tm *tm); char *asctime(const struct tm *tm); char *asctime_r(const struct tm *tm, char *buf); char *ctime(const time_t *timep); char *ctime_r(const time_t *timep, char *buf); struct tm *gmtime(const time_t *timep); struct tm *gmtime_r(const time_t *timep, struct tm *result); struct tm *localtime(const time_t *timep); struct tm *localtime_r(const time_t *timep, struct tm *result); time_t mktime(struct tm *tm); struct tm { int tm_hour;// hour (0 - 23) int tm_isdst;// Daylight saving time enabled (> 0), disabled (= 0), or unknown (< 0) int tm_mday;// day of the month (1 - 31) int tm_min;// minutes (0 - 59) int tm_mon;// month (0 - 11, 0 = January) int tm_sec;// seconds (0 - 59) int tm_wday;// day of the week (0 - 6, 0 = Sunday) int tm_yday;// day of the year (0 - 365) int tm_year;// year since 1900 } [링크 : http://en.wikipedia.org/wiki/Time.h] Time_t 구조체 내용 [링크 : http://en.wikipedia.org/wiki/Time_t] Time_t 구조체 사용방법 [링크 : http://linux.die.net/man/3/strftime] [링크 : http://linux.die.net/man/3/localtime] [링크 : http://linux.die.net/man/3/mktime] |
int main(void)
{
time_t now;
struct tm tmtm;
struct tm *ts;
char buf[80];
/* Get the current time */
//now = time(NULL);
tmtm.tm_year = 102;
tmtm.tm_mon = 1;
tmtm.tm_mday = 23;
tmtm.tm_hour = 10;
tmtm.tm_min = 12;
tmtm.tm_sec = 51;
now = mktime(&tmtm);
/* Format and print the time, "ddd yyyy-mm-dd hh:mm:ss zzz" */
ts = localtime(&now);
strftime(buf, sizeof(buf), "%a %Y-%m-%d %H:%M:%S %Z", ts);
printf("%s\n", buf);
return 0;
}
결과는 아래와 같다.| Sat 2002-02-23 10:12:51 KST |
| OOM - Out of Memory (2) | 2009.12.15 |
|---|---|
| Linux 에서 malloc 으로 할당된 memory 크기를 알 수 있는 방법 (2) | 2009.12.14 |
| compiz / beryl (0) | 2009.12.09 |
| LiveUSB의 Persistence file 용량 증설하기 (0) | 2009.12.09 |
| linux live USB creator / LiveUSB Creator (2) | 2009.12.09 |
| Linux 에서 malloc 으로 할당된 memory 크기를 알 수 있는 방법 (2) | 2009.12.14 |
|---|---|
| 시간관련 함수/구조체 - time API on linux (0) | 2009.12.09 |
| LiveUSB의 Persistence file 용량 증설하기 (0) | 2009.12.09 |
| linux live USB creator / LiveUSB Creator (2) | 2009.12.09 |
| cal (달력/calendar) 소스코드 (source code of linux cal) (0) | 2009.12.08 |
| TC1100에 우분투 설치 관련 문서 (6) | 2009.12.10 |
|---|---|
| Xournal + CellWriter (4) | 2009.12.10 |
| Ubuntu 9.10 만세 (4) | 2009.12.09 |
| 9.10 kalmic 업그레이드 / 맛배기 (0) | 2009.11.02 |
| gnome panel에 온도 정보 넣기 (0) | 2009.11.02 |