use more utc timezone
This commit is contained in:
parent
fe707e4569
commit
ee3c0b6f3c
1 changed files with 3 additions and 3 deletions
|
@ -85,7 +85,7 @@ case "$action" in
|
||||||
|
|
||||||
printf '{"till":%s,"user":%s}' \
|
printf '{"till":%s,"user":%s}' \
|
||||||
"$till" \
|
"$till" \
|
||||||
"$json_username" |
|
"$json_username" |
|
||||||
bwt_sign |
|
bwt_sign |
|
||||||
jq -R "{ error: false, created: $created, user: $json_username, till: $till, token: . }"
|
jq -R "{ error: false, created: $created, user: $json_username, till: $till, token: . }"
|
||||||
} || json_err
|
} || json_err
|
||||||
|
@ -109,8 +109,8 @@ case "$action" in
|
||||||
json_err "status should be between 1 and 200 characters"
|
json_err "status should be between 1 and 200 characters"
|
||||||
exit
|
exit
|
||||||
fi
|
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 "$user"),
|
||||||
$(escape_sql_str "$status"),
|
$(escape_sql_str "$status"),
|
||||||
$(escape_sql_str "$(date --rfc-3339=seconds)")::timestamp
|
$(escape_sql_str "$(date --rfc-3339=seconds)")::timestamp
|
||||||
|
|
Loading…
Reference in a new issue