diff --git a/src/ssb.c b/src/ssb.c index 618f92d6..1178a792 100644 --- a/src/ssb.c +++ b/src/ssb.c @@ -1135,8 +1135,8 @@ void tf_ssb_append_message(tf_ssb_t* ssb, JSValue message) JS_SetPropertyStr(context, root, "author", authorstr); JS_SetPropertyStr(context, root, "sequence", JS_NewInt64(context, previous_sequence + 1)); - time_t now = time(NULL); - JS_SetPropertyStr(context, root, "timestamp", JS_NewInt64(context, now * 1000)); + int64_t now = (int64_t)time(NULL); + JS_SetPropertyStr(context, root, "timestamp", JS_NewInt64(context, now * 1000LL)); JSValue hashstr = JS_NewString(context, "sha256"); JS_SetPropertyStr(context, root, "hash", hashstr); JSValue content = JS_DupValue(context, message);