C/time.h/asctime — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
(нет различий)
|
Текущая версия на 13:22, 25 мая 2010
asctime: returns a string for tm in the following form: day month date hours:minutes:seconds year
<source lang="cpp">
//Declaration: char *asctime(const struct tm *ptr);
#include <time.h> #include <stdio.h> int main(void) { struct tm *ptr; time_t lt; lt = time(NULL); ptr = localtime(<); printf(asctime(ptr)); return 0; }
/* Sat Mar 3 16:12:43 2007
- /
</source>