diff options
Diffstat (limited to 'sfeed_plain.c')
-rw-r--r-- | sfeed_plain.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sfeed_plain.c b/sfeed_plain.c index 6dd3d5e..42f9626 100644 --- a/sfeed_plain.c +++ b/sfeed_plain.c @@ -26,19 +26,19 @@ printfeed(FILE *fp, const char *feedname) parseline(line, fields); parsedtime = 0; - if (strtotime(fields[FieldUnixTimestamp], &parsedtime)) - continue; - if (!(tm = localtime(&parsedtime))) - err(1, "localtime"); - - if (parsedtime >= comparetime) - fputs("N ", stdout); - else - fputs(" ", stdout); + if (!strtotime(fields[FieldUnixTimestamp], &parsedtime) && + (tm = localtime(&parsedtime))) { + if (parsedtime >= comparetime) + fputs("N ", stdout); + else + fputs(" ", stdout); + 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); + } - 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 (feedname[0]) { printutf8pad(stdout, feedname, 15, ' '); fputs(" ", stdout); |