Function (Path Standard C Header / time.h)

strftime

int strftime(char *string, size_t maxSize, char *format, struct tm *timePtr);

Formats the time represented by the structure timeptr according to the formatting rules defined in format and stores it in str.


Parameters

  char *string
  size_t maxSize
  char *format
  struct tm *timePtr

函数 (属于 标准C头文件 / time.h)

strftime

int strftime(char *string, size_t maxSize, char *format, struct tm *timePtr);

根据 format 中定义的格式化规则,格式化结构 timeptr 表示的时间,并把它存储在 str 中


参数

  char *string
  size_t maxSize
  char *format
  struct tm *timePtr