shardingsphere
shardingsphere copied to clipboard
Only support timezone start with prefix GMT ?
version about my project spring boot 2.6.10 shardingsphere 5.1.2 mysql 8.0
DB configuration
spring:
shardingsphere:
datasource:
names: ds
ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://x.x.x.x:3306/data_demo?serverTimezone=UTC%2B8&characterEncoding=utf-8&useUnicode=yes&autoReconnect=true&useSSL=false
When the timezone in jdbc url is UTC+8, shardingsphere will ignore it, all timestamp persisted in db are UTC time, so I test this jdbc url with other jpa or mybatis project without shardingsphere all timestamp of them are UTC+8, if serverTimezone is GMT+8, timestamp persisted in db are GMT+8. I know most of time GMT and UTC are the same, but it will be annoying when updating some features for old project, cause most of them are using UTC way.