Created
September 22, 2016 08:41
-
-
Save shkesar/953422ef173bce3bf0faefd7fb9c19ef to your computer and use it in GitHub Desktop.
Time in C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
int main() | |
{ | |
time_t now = time(NULL); | |
struct tm *lt = localtime(&now); | |
printf("%d/%d/%d\n", lt->tm_mday, lt->tm_mon, 1900lt->tm_year); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment