"gcc show_time.c -o show_time" or "diet gcc show_time.c -o show_time"
Code: Select all
//gcc show_time.c -o show_time
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
time_t now;
time(&now);
printf("%s", ctime(&now));
return EXIT_SUCCESS;
}
Sat Sep 29 14:39:24 2012
which is in many ways the result I want...but running the same bin linked with dietlibc or uclibc gives:
Sat Sep 29 06:40:38 2012
which is not the time I want...
How to fix this?