- CVI 정보나눔(www.cvi.kr)
- 스터디
- 개발메모
개발메모(형식에 매이지 않는 짤막한 개발 낙서)
글 수 174
매번 찾게 되니....
struct tm *localtime(
const time_t *timer
);
struct tm *_localtime64(
const __time64_t *timer
);
Return a pointer to the structure result. If the value in timer represents a date before midnight, January 1, 1970, return NULL.
_localtime64, which uses the __time64_t structure, allows dates to be expressed up through 23:59:59, December 31, 3000, coordinated universal time (UTC), whereas localtime represents dates through 19:14:07 January 18, 2038, UTC.
The fields of the structure type tm store the following values, each of which is an int:
tm_sec
Seconds after minute (0 – 59).
tm_min
Minutes after hour (0 – 59).
tm_hour
Hours after midnight (0 – 23).
tm_mday
Day of month (1 – 31).
tm_mon
Month (0 – 11; January = 0).
tm_year
Year (current year minus 1900).
tm_wday
Day of week (0 – 6; Sunday = 0).
tm_yday
Day of year (0 – 365; January 1 = 0).
tm_isdst
Positive value if daylight saving time is in effect; 0 if daylight saving time is not in effect; negative value if status of daylight saving time is unknown. If the TZ environment variable is set, the C run-time library assumes rules appropriate to the United States for implementing the calculation of daylight-saving time (DST).
struct tm *localtime(
const time_t *timer
);
struct tm *_localtime64(
const __time64_t *timer
);
Return a pointer to the structure result. If the value in timer represents a date before midnight, January 1, 1970, return NULL.
_localtime64, which uses the __time64_t structure, allows dates to be expressed up through 23:59:59, December 31, 3000, coordinated universal time (UTC), whereas localtime represents dates through 19:14:07 January 18, 2038, UTC.
The fields of the structure type tm store the following values, each of which is an int:
tm_sec
Seconds after minute (0 – 59).
tm_min
Minutes after hour (0 – 59).
tm_hour
Hours after midnight (0 – 23).
tm_mday
Day of month (1 – 31).
tm_mon
Month (0 – 11; January = 0).
tm_year
Year (current year minus 1900).
tm_wday
Day of week (0 – 6; Sunday = 0).
tm_yday
Day of year (0 – 365; January 1 = 0).
tm_isdst
Positive value if daylight saving time is in effect; 0 if daylight saving time is not in effect; negative value if status of daylight saving time is unknown. If the TZ environment variable is set, the C run-time library assumes rules appropriate to the United States for implementing the calculation of daylight-saving time (DST).