[ create a new paste ] login | about

Link: http://codepad.org/gIeFBrAy    [ raw code | output | fork ]

slevy1ster - C, pasted on Jun 27:
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;
}


Output:
1
27-06-2017 10:47:48


Create a new paste based on this one


Comments: