diff --git a/constants/constants.go b/constants/constants.go index 806de4f5..e318c4c6 100644 --- a/constants/constants.go +++ b/constants/constants.go @@ -17,3 +17,5 @@ var BRANCH_ID int64 = 2 //20954 // CONNECTION - объект Соединение, настроенный var CONNECTION = connections.Connection{Table_Connection: table_connections.Table_Connection{ID: CONNECTION_ID, BranchID: BRANCH_ID, IsLegal: true, Server: "10.1.9.153", Port: "5432", DbName: "kol_atom_ul_uni", DbScheme: "stack", Login: "", Password: ""}} + +var TIME_ZONE = "Europe/Moscow" diff --git a/postgres_gorm/postgres_gorm.go b/postgres_gorm/postgres_gorm.go index 075f6d83..147d70c4 100644 --- a/postgres_gorm/postgres_gorm.go +++ b/postgres_gorm/postgres_gorm.go @@ -6,6 +6,7 @@ import ( "context" "errors" "fmt" + "github.com/ManyakRus/starter/constants" "github.com/ManyakRus/starter/logger" "github.com/ManyakRus/starter/port_checker" "strings" @@ -334,7 +335,8 @@ func GetDSN(ApplicationName string) string { dsn += "user=" + Settings.DB_USER + " " dsn += "password=" + Settings.DB_PASSWORD + " " dsn += "dbname=" + Settings.DB_NAME + " " - dsn += "port=" + Settings.DB_PORT + " sslmode=disable TimeZone=UTC " + dsn += "port=" + Settings.DB_PORT + " " + dsn += "sslmode=disable TimeZone=" + constants.TIME_ZONE + " " dsn += "application_name=" + ApplicationName return dsn