aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/datetime-parser.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/datetime-parser.c b/src/datetime-parser.c
index 1d39490..572c9f0 100644
--- a/src/datetime-parser.c
+++ b/src/datetime-parser.c
@@ -366,9 +366,10 @@ blogc_convert_datetime(const char *orig, const char *format,
char buf[1024];
if (0 == strftime(buf, sizeof(buf), format, &t)) {
- fprintf(stderr, "blogc: warning: Failed to format DATE variable, "
- "FORMAT is too long: %s\n", format);
- return b_strdup(orig);
+ *err = blogc_error_new_printf(BLOGC_ERROR_DATETIME_PARSER,
+ "Failed to format DATE variable, FORMAT is too long: %s",
+ format);
+ return NULL;
}
return b_strdup(buf);