diff options
author | June McEnroe <june@causal.agency> | 2020-04-13 13:13:37 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-13 13:13:37 -0400 |
commit | 77dc80bbbe942eef0453fc1e3b7782a2ddf29879 (patch) | |
tree | 5a1518ce9772429b13c08d6cd9d406c01224c39e /html.c | |
parent | Use UTC date everywhere (diff) | |
download | bubger-77dc80bbbe942eef0453fc1e3b7782a2ddf29879.tar.gz bubger-77dc80bbbe942eef0453fc1e3b7782a2ddf29879.zip |
Preserve original Date header in envelope
Diffstat (limited to '')
-rw-r--r-- | html.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/html.c b/html.c index 808e799..1d28541 100644 --- a/html.c +++ b/html.c @@ -89,15 +89,16 @@ int htmlMessageHead(FILE *file, const struct Envelope *envelope) { ); char *mbox = templateURL("../message/[pathID].mbox", urlVars); - char date[sizeof("0000-00-00T00:00:00Z")]; - strftime(date, sizeof(date), "%FT%TZ", gmtime(&envelope->date)); + char utc[sizeof("0000-00-00T00:00:00Z")]; + strftime(utc, sizeof(utc), "%FT%TZ", gmtime(&envelope->time)); struct Variable vars[] = { { "messageID", envelope->messageID }, { "fragment", fragment }, { "subject", envelope->subject }, { "mailto", mailto }, { "from", addressName(envelope->from) }, - { "date", date }, + { "date", envelope->date }, + { "utc", utc }, { "mbox", mbox }, {0}, }; @@ -106,7 +107,7 @@ int htmlMessageHead(FILE *file, const struct Envelope *envelope) { <summary> <a class="subject" href="[fragment]">[subject]</a> <address class="from"><a href="[mailto]">[from]</a></address> - <time datetime="[date]">[date]</time> + <time datetime="[utc]">[date]</time> <a class="mbox" href="[mbox]">mbox</a> </summary> ); |