ref: 55b8b5ccf5cb157b492ed8e84e95fefb3d43ecee
parent: 060549d01f54d692754d493f51d0bc8e908e1ffc
author: Michael Forney <mforney@mforney.org>
date: Sat Oct 29 20:02:43 EDT 2022
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.
--- a/sys/src/cmd/upas/fs/strtotm.c
+++ b/sys/src/cmd/upas/fs/strtotm.c
@@ -6,6 +6,7 @@
{
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",
--
⑨