summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c
index 7f642b9..6c8772d 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -498,7 +498,7 @@ xs_dict *msg_base(snac *snac, const char *type, const char *id,
498 498
499 /* generated values */ 499 /* generated values */
500 if (date && strcmp(date, "@now") == 0) { 500 if (date && strcmp(date, "@now") == 0) {
501 published = xs_str_utctime(0, "%Y-%m-%dT%H:%M:%SZ"); 501 published = xs_str_utctime(0, ISO_DATE_SPEC);
502 date = published; 502 date = published;
503 } 503 }
504 504
@@ -959,7 +959,7 @@ xs_dict *msg_question(snac *user, const char *content, const xs_list *opts, int
959 959
960 /* set the end time */ 960 /* set the end time */
961 time_t t = time(NULL) + end_secs; 961 time_t t = time(NULL) + end_secs;
962 xs *et = xs_str_utctime(t, "%Y-%m-%dT%H:%M:%SZ"); 962 xs *et = xs_str_utctime(t, ISO_DATE_SPEC);
963 963
964 msg = xs_dict_append(msg, "endTime", et); 964 msg = xs_dict_append(msg, "endTime", et);
965 965
@@ -1234,7 +1234,7 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1234 1234
1235 if (xs_is_null(xs_dict_get(f_msg, "published"))) { 1235 if (xs_is_null(xs_dict_get(f_msg, "published"))) {
1236 /* add a date if it doesn't include one (Mastodon) */ 1236 /* add a date if it doesn't include one (Mastodon) */
1237 xs *date = xs_str_utctime(0, "%Y-%m-%dT%H:%M:%SZ"); 1237 xs *date = xs_str_utctime(0, ISO_DATE_SPEC);
1238 f_msg = xs_dict_set(f_msg, "published", date); 1238 f_msg = xs_dict_set(f_msg, "published", date);
1239 } 1239 }
1240 1240