1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <stdio.h> #include <time.h> int main (void) { char buff[100]; time_t now = time(0); struct tm now_t = *localtime(&now); strftime (buff, 100, "%d-%m-%Y %H:%M:%S", &now_t); puts(buff); return 0; }
1
27-06-2017 10:47:48