diff options
author | Michael Forney <mforney@mforney.org> | 2022-10-30 00:02:43 +0000 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2022-10-30 00:02:43 +0000 |
commit | 002384634cb0ca367eebda0b4f9dc9a11a29b3f5 (patch) | |
tree | 2068ac840f18d488dce342dba2ab76668a100bf3 /sys | |
parent | 82435c350a1d3530c87ea88ada68e984fc6b9b80 (diff) |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/cmd/upas/fs/strtotm.c | 1 |
1 files changed, 1 insertions, 0 deletions
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", |