From 002384634cb0ca367eebda0b4f9dc9a11a29b3f5 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 30 Oct 2022 00:02:43 +0000 Subject: upas/fs: support date format used in RFC 4155 mbox files The RFC says that the message separator line consists of > a timestamp indicating the UTC date and time when the message > was originally received, conformant with the syntax of the > traditional UNIX 'ctime' output sans timezone (note that the > use of UTC precludes the need for a timezone indicator); It also references http://qmail.org/man/man5/mbox.html as an authoritative source, which says the date "always contains exactly 24 characters in asctime format". Add this date format for compatibility with tools using the standard mbox format, in particular git format-patch. --- sys/src/cmd/upas/fs/strtotm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/src') diff --git a/sys/src/cmd/upas/fs/strtotm.c b/sys/src/cmd/upas/fs/strtotm.c index 96f60c470..d41c84b34 100644 --- a/sys/src/cmd/upas/fs/strtotm.c +++ b/sys/src/cmd/upas/fs/strtotm.c @@ -6,6 +6,7 @@ strtotm(char *s, Tm *t) { char **f, *fmt[] = { "WW MMM DD hh:mm:ss ?Z YYYY", + "WW MMM DD hh:mm:ss YYYY", "?WW ?DD ?MMM ?YYYY hh:mm:ss ?Z", "?WW ?DD ?MMM ?YYYY hh:mm:ss", "?WW, DD-?MM-YY", -- cgit v1.2.3