summary refs log tree commit diff
path: root/archive.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-11-29 00:50:33 -0500
committerJune McEnroe <june@causal.agency>2020-11-29 00:50:33 -0500
commita4d4e766e38c7c8aa0c842e6de84b912c9fcaed7 (patch)
tree3166fb318dffa213548eb6c1bf6783e7988296d1 /archive.h
parentReplace templateBuffer with templateString (diff)
downloadbubger-a4d4e766e38c7c8aa0c842e6de84b912c9fcaed7.tar.gz
bubger-a4d4e766e38c7c8aa0c842e6de84b912c9fcaed7.zip
Revert to old quoting style in atom
Diffstat (limited to 'archive.h')
-rw-r--r--archive.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/archive.h b/archive.h
index 3328340..8576df5 100644
--- a/archive.h
+++ b/archive.h
@@ -172,6 +172,14 @@ void concatData(
 void concatThreads(struct List threads, const struct Envelope *envelopes);
 void concatIndex(struct List threads, const struct Envelope *envelopes);
 
+static inline struct ISO8601 {
+	char s[sizeof("0000-00-00T00:00:00Z")];
+} iso8601(time_t time) {
+	struct ISO8601 buf;
+	strftime(buf.s, sizeof(buf.s), "%FT%TZ", gmtime(&time));
+	return buf;
+}
+
 struct Variable {
 	const char *name;
 	const char *value;