14 lines
317 B
C
14 lines
317 B
C
|
#include <stdio.h>
|
||
|
#include <time.h>
|
||
|
int main() {
|
||
|
time_t current_time;
|
||
|
current_time = time(NULL);
|
||
|
printf("Content-type:text/plain\n\n");
|
||
|
if (current_time == ((time_t)-1)) {
|
||
|
printf("Unable to get current time.\n");
|
||
|
return 1;
|
||
|
}
|
||
|
printf("%ld", (long)current_time);
|
||
|
return 0;
|
||
|
}
|