fork(9) download
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. int main(void) {
  5. time_t mytime;
  6. mytime = time(NULL);
  7. struct tm tm = *localtime(&mytime);
  8. printf("Data: %d/%d/%d\n", tm.tm_mday, tm.tm_mon + 1, tm.tm_year + 1900);
  9. }
Success #stdin #stdout 0s 2300KB
stdin
Standard input is empty
stdout
Data: 16/10/2016