END_TEST START_TEST (strtime2_test) { const char *res; char *expected; time_t now; mark_point(); now = 0; expected = "Thu Jan 01 00:00:00 1970"; res = pr_strtime2(now, TRUE); fail_unless(res != NULL, "Failed to convert time %lu: %s", (unsigned long) now, strerror(errno)); fail_unless(strcmp(res, expected) == 0, "Expected '%s', got '%s'", expected, res); }
const char *pr_strtime(time_t t) { return pr_strtime2(t, FALSE); }