Skip to content

Commit 381039a

Browse files
authored
db.properties: Enforce UTC timezone by default (#4055)
* db.properties: Enforce UTC timezone by default This would give users ability to change the timezone Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> * fix server time to UTC Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> * Update the db.usage.url.params=serverTimezone=UTC per Liridon's testing Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 689e529 commit 381039a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

client/conf/db.properties.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ db.cloud.testWhileIdle=true
3939
db.cloud.timeBetweenEvictionRunsMillis=40000
4040
db.cloud.minEvictableIdleTimeMillis=240000
4141
db.cloud.poolPreparedStatements=false
42-
db.cloud.url.params=prepStmtCacheSize=517&cachePrepStmts=true&sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
42+
db.cloud.url.params=prepStmtCacheSize=517&cachePrepStmts=true&sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'&serverTimezone=UTC
4343

4444
# CloudStack database SSL settings
4545
db.cloud.useSSL=false
@@ -64,7 +64,7 @@ db.usage.name=cloud_usage
6464
db.usage.maxActive=100
6565
db.usage.maxIdle=30
6666
db.usage.maxWait=10000
67-
db.usage.url.params=
67+
db.usage.url.params=serverTimezone=UTC
6868

6969
# Simulator database settings
7070
db.simulator.username=@DBUSER@

utils/conf/db.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ db.cloud.testWhileIdle=true
4444
db.cloud.timeBetweenEvictionRunsMillis=40000
4545
db.cloud.minEvictableIdleTimeMillis=240000
4646
db.cloud.poolPreparedStatements=false
47-
db.cloud.url.params=prepStmtCacheSize=517&cachePrepStmts=true&prepStmtCacheSqlLimit=4096&sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
47+
db.cloud.url.params=prepStmtCacheSize=517&cachePrepStmts=true&prepStmtCacheSqlLimit=4096&sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'&serverTimezone=UTC
4848

4949
# usage database settings
5050
db.usage.username=cloud
@@ -60,6 +60,7 @@ db.usage.maxActive=100
6060
db.usage.maxIdle=30
6161
db.usage.maxWait=10000
6262
db.usage.autoReconnect=true
63+
db.usage.url.params=serverTimezone=UTC
6364

6465
# Simulator database settings
6566
db.simulator.username=cloud

0 commit comments

Comments
 (0)