summaryrefslogtreecommitdiff
path: root/sfeed_html.c
diff options
context:
space:
mode:
Diffstat (limited to 'sfeed_html.c')
-rw-r--r--sfeed_html.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sfeed_html.c b/sfeed_html.c
index 97318af..42e6572 100644
--- a/sfeed_html.c
+++ b/sfeed_html.c
@@ -41,20 +41,20 @@ printfeed(FILE *fp, struct feed *f)
parseline(line, fields);
parsedtime = 0;
- if (strtotime(fields[FieldUnixTimestamp], &parsedtime))
- continue;
- if (!(tm = localtime(&parsedtime)))
- err(1, "localtime");
-
- isnew = (parsedtime >= comparetime) ? 1 : 0;
- totalnew += isnew;
- f->totalnew += isnew;
+ if (!strtotime(fields[FieldUnixTimestamp], &parsedtime) &&
+ (tm = localtime(&parsedtime))) {
+ isnew = (parsedtime >= comparetime) ? 1 : 0;
+ totalnew += isnew;
+ f->totalnew += isnew;
+
+ fprintf(stdout, "%04d-%02d-%02d %02d:%02d ",
+ tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min);
+ } else {
+ fputs(" ", stdout);
+ }
f->total++;
- fprintf(stdout, "%04d-%02d-%02d %02d:%02d ",
- tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
- tm->tm_hour, tm->tm_min);
-
if (fields[FieldLink][0]) {
fputs("<a href=\"", stdout);
xmlencode(fields[FieldLink], stdout);