Guest User

Untitled

a guest
Jun 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4.  
  5. int main()
  6. {
  7. time_t time_now;
  8. struct tm *time_s;
  9. time_now = time(NULL);
  10. time_s = localtime(&time_now);
  11. 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);
  12. return 0;
  13. }
Add Comment
Please, Sign In to add comment