actually fix dates (wow)
This commit is contained in:
parent
a2d55b6055
commit
aa2e2e92df
2 changed files with 3 additions and 3 deletions
|
@ -113,7 +113,7 @@ case "$action" in
|
|||
db_query "SET TIME ZONE 'UTC'; INSERT INTO posts (username, contents, ts) VALUES (
|
||||
$(escape_sql_str "$user"),
|
||||
$(escape_sql_str "$status"),
|
||||
$(escape_sql_str "$(date --rfc-3339=seconds)")::timestamp
|
||||
$(escape_sql_str "$(date -u --rfc-3339=seconds)")::timestamp
|
||||
) ON CONFLICT (username) DO UPDATE
|
||||
SET contents=excluded.contents, ts=excluded.ts" >&2
|
||||
echo '{"error":false}'
|
||||
|
|
|
@ -181,7 +181,7 @@ function renderStatus(status) {
|
|||
instance.target = "_blank";
|
||||
let timestamp = document.createElement("span");
|
||||
timestamp.classList.add("timestamp", "date", "date-rfc3339");
|
||||
timestamp.innerText = new Date(status.timestamp).toISOString();
|
||||
timestamp.innerText = new Date(Date.UTC(status.timestamp)).toISOString();
|
||||
meta.append(username, at, instance, " at ", timestamp);
|
||||
quote.appendChild(meta);
|
||||
|
||||
|
@ -207,7 +207,7 @@ async function updateStatuses() {
|
|||
for (let [contents, username, timestamp] of value)
|
||||
statuses.push({
|
||||
username,
|
||||
timestamp: Date.parse(timestamp),
|
||||
timestamp,
|
||||
contents,
|
||||
instance,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue