Skip to content

Commit 38e6ba1

Browse files
committed
Merge branch 'task/cath-all-create-alias' into staging
2 parents b5cff51 + 6a0b40b commit 38e6ba1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • api/internal/repository

‎api/internal/repository/db.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func connect(cfg config.DBConfig) (*gorm.DB, error) {
5252
host_main = cfg.Hosts[0]
5353
}
5454

55-
dsn_main := cfg.User + ":" + cfg.Password + "@tcp(" + host_main + ":" + cfg.Port + ")/" + cfg.Name + "?charset=utf8mb4&parseTime=True&loc=Local"
55+
dsn_main := cfg.User + ":" + cfg.Password + "@tcp(" + host_main + ":" + cfg.Port + ")/" + cfg.Name + "?charset=utf8mb4&parseTime=True&loc=UTC&time_zone=%27%2B00%3A00%27"
5656

5757
db, err := gorm.Open(mysql.Open(dsn_main), config)
5858
if err != nil {
@@ -71,7 +71,7 @@ func connect(cfg config.DBConfig) (*gorm.DB, error) {
7171
continue
7272
}
7373

74-
replicas = append(replicas, mysql.Open(cfg.User+":"+cfg.Password+"@tcp("+host+":"+cfg.Port+")/"+cfg.Name+"?charset=utf8mb4&parseTime=True&loc=Local"))
74+
replicas = append(replicas, mysql.Open(cfg.User+":"+cfg.Password+"@tcp("+host+":"+cfg.Port+")/"+cfg.Name+"?charset=utf8mb4&parseTime=True&loc=UTC&time_zone=%27%2B00%3A00%27"))
7575
}
7676

7777
if len(replicas) > 0 {

0 commit comments

Comments
 (0)