summaryrefslogtreecommitdiffabout
path: root/lib/util.cc
blob: 350cbac0b510859fac4dd4e399b99ac3bd4f8db7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <napkin/util.h>

namespace napkin {

    string strftime(const char *fmt,time_t t) {
	struct tm tt;
	localtime_r(&t,&tt);// TODO: check res
	char rv[1024];
	strftime(rv,sizeof(rv),fmt,&tt); // TODO: check res
	return rv;
    }

}