From ee3c0b6f3c65f39b311b394e5d5e013669e452e2 Mon Sep 17 00:00:00 2001 From: slonkaphone Date: Mon, 30 Dec 2024 01:06:21 +0300 Subject: [PATCH] use more utc timezone --- blogin.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blogin.sh b/blogin.sh index 8aa3559..f3245ef 100644 --- a/blogin.sh +++ b/blogin.sh @@ -85,7 +85,7 @@ case "$action" in printf '{"till":%s,"user":%s}' \ "$till" \ - "$json_username" | + "$json_username" | bwt_sign | jq -R "{ error: false, created: $created, user: $json_username, till: $till, token: . }" } || json_err @@ -109,8 +109,8 @@ case "$action" in json_err "status should be between 1 and 200 characters" exit fi - - db_query "INSERT INTO posts (username, contents, ts) VALUES ( + + 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