fork(1) download
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. int main(void) {
  5. struct tm broken_down;
  6. broken_down.tm_year = 2000 - 1900;
  7. broken_down.tm_mon = 0;
  8. broken_down.tm_mday = 1;
  9. broken_down.tm_hour = broken_down.tm_min = broken_down.tm_sec = 0;
  10.  
  11. printf("Current date and time: %s", asctime(&broken_down));
  12. }
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
Current date and time: Sun Jan  1 00:00:00 2000