My slstatus configuration
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

17 行
258 B

  1. /* See LICENSE file for copyright and license details. */
  2. #include <time.h>
  3. #include "../util.h"
  4. const char *
  5. datetime(const char *fmt)
  6. {
  7. time_t t;
  8. t = time(NULL);
  9. if (strftime(buf, sizeof(buf), fmt, localtime(&t)) == 0)
  10. return NULL;
  11. return buf;
  12. }