summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Stradling <rob@comodo.com>2017-05-05 12:02:32 +0100
committerRob Stradling <rob@comodo.com>2017-05-05 12:02:32 +0100
commit74b8686764ee1ab921ed741668f6117cf270d56f (patch)
treed506b28dd13598e87d3d90a1861899885586b42f
parent90884b1397927cab5f6fea52e54c08475308d575 (diff)
downloadct_monitor-74b8686764ee1ab921ed741668f6117cf270d56f.zip
ct_monitor-74b8686764ee1ab921ed741668f6117cf270d56f.tar.gz
ct_monitor-74b8686764ee1ab921ed741668f6117cf270d56f.tar.bz2
Ensure latest_update is always stored as UTC, not BST.
-rw-r--r--ct_monitor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ct_monitor.c b/ct_monitor.c
index 6f2ea3c..338564c 100644
--- a/ct_monitor.c
+++ b/ct_monitor.c
@@ -411,7 +411,7 @@ int main(
sprintf(
t_query[0],
"UPDATE ct_log"
- " SET LATEST_UPDATE=statement_timestamp(),"
+ " SET LATEST_UPDATE=statement_timestamp() AT TIME ZONE 'UTC',"
" TREE_SIZE=%" LENGTH64 "d,"
" LATEST_STH_TIMESTAMP=(TIMESTAMP WITH TIME ZONE 'epoch'"
" + interval'%" LENGTH64 "d seconds'"
@@ -470,7 +470,7 @@ int main(
sprintf(
t_query[0],
"UPDATE ct_log"
- " SET LATEST_UPDATE=statement_timestamp()"
+ " SET LATEST_UPDATE=statement_timestamp() AT TIME ZONE 'UTC'"
" WHERE ID=%s",
PQgetvalue(t_PGresult_select, i, 0)
);