commit e9711f9
default
·
2023-06-28 08:50:17 +0000 UTC
parent 833540d
Skip leading zeros en poll closing time.
1 files changed,
+5,
-1
M
html.c
M
html.c
+5,
-1
1@@ -1071,8 +1071,12 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
2 if (t1 > 0 && t1 > t0) {
3 time_t diff_time = t1 - t0;
4 xs *tf = xs_str_time_diff(diff_time);
5+ char *p = tf;
6
7- xs *s1 = xs_fmt("<p>%s %s</p>", L("Closes in"), tf);
8+ /* skip leading zeros */
9+ for (; *p == '0' || *p == ':'; p++);
10+
11+ xs *s1 = xs_fmt("<p>%s %s</p>", L("Closes in"), p);
12 c = xs_str_cat(c, s1);
13 }
14 }