fork download
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. int main() {
  5. setenv("TZ", "Asia/Shanghai", 1);
  6. tzset();
  7. time_t t = time(NULL);
  8. struct tm *current_time = localtime(&t);
  9. int frame = (current_time->tm_hour * 3600 + current_time->tm_min * 60 + current_time->tm_sec) * 24;
  10. printf("时间: %04d-%02d-%02d %02d:%02d:%02d\n帧数: %d\n试一试下一秒!🦁\n",
  11. current_time->tm_year + 1900, current_time->tm_mon + 1, current_time->tm_mday,
  12. current_time->tm_hour, current_time->tm_min, current_time->tm_sec, frame);
  13. return 0;
  14. }
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. //55555555555
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
时间: 2025-02-19 16:13:46
帧数: 1402224
试一试下一秒!🦁