summary refs log tree commit diff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c9
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>
 	);