My slstatus configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415
  1. #include <time.h>
  2. #include "util.h"
  3. const char *
  4. datetime(const char *fmt)
  5. {
  6. time_t t;
  7. t = time(NULL);
  8. if (strftime(buf, sizeof(buf), fmt, localtime(&t)) == 0)
  9. return NULL;
  10. return buf;
  11. }