Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <time.h>
- int main()
- {
- time_t time_now;
- struct tm *time_s;
- time_now = time(NULL);
- time_s = localtime(&time_now);
- printf("Time: %i-%i-%i %i:%i:%i\n", 1900+time_s->tm_year, time_s->tm_mon, time_s->tm_mday, time_s->tm_hour, time_s->tm_min, time_s->tm_sec);
- return 0;
- }
Add Comment
Please, Sign In to add comment