20 lines
377 B
C
20 lines
377 B
C
|
/* ctime example */
|
||
|
#include <stdio.h>
|
||
|
#include <stdint.h>
|
||
|
#include <time.h>
|
||
|
|
||
|
int main ()
|
||
|
{
|
||
|
time_t rawtime;
|
||
|
|
||
|
time ( &rawtime );
|
||
|
|
||
|
struct tm *local = localtime(&rawtime);
|
||
|
|
||
|
printf ( "The current local time is: %04d-%02d-%02d\n", local->tm_wday, local->tm_mon + 1, local->tm_mday );
|
||
|
printf ("%d\n", 8*sizeof(int8_t*));
|
||
|
printf ("%d\n", 8*sizeof(int8_t));
|
||
|
|
||
|
return 0;
|
||
|
}
|