From 7d108832528eb1ee85a445a562c00b5a8344d882 Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Sat, 29 Oct 2022 18:19:47 +0000 Subject: tmdate: provide better parse errors it's often not obvious what date component caused an error when eyeballing a date format string and date; make the error message contain this information. --- sys/src/libc/port/date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src') diff --git a/sys/src/libc/port/date.c b/sys/src/libc/port/date.c index c9526dec6..cf532cb8e 100644 --- a/sys/src/libc/port/date.c +++ b/sys/src/libc/port/date.c @@ -985,7 +985,7 @@ Zoneparsed: tmtimens(tm, abs, tm->nsec, tz); return tm; baddate: - werrstr("invalid date %s", str); + werrstr("invalid %c component in '%s'", c0, str); return nil; badfmt: werrstr("garbled format %s near '%s'", fmt, p); -- cgit v1.2.3