MCPcopy Create free account
hub / github.com/ElementsProject/lightning / fmt_time

Function fmt_time

devtools/bolt12-cli.c:44–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44static char *fmt_time(const tal_t *ctx, u64 time)
45{
46 /* ctime is not sane. Take pointer, returns \n in string. */
47 time_t t = time;
48 const char *p = ctime(&t);
49
50 return tal_fmt(ctx, "%.*s", (int)strcspn(p, "\n"), p);
51}
52
53static bool must_str(bool expected, const char *complaint, const char *fieldname)
54{

Callers 3

print_recurrenceFunction · 0.70
print_abstimeFunction · 0.70
print_relative_expiryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected