1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-26 23:10:42 +02:00

сделал constants.TIME_ZONE

This commit is contained in:
Nikitin Aleksandr
2024-01-10 17:25:29 +03:00
parent f1cc2e5171
commit 8bd64620fd
2 changed files with 5 additions and 1 deletions

View File

@@ -17,3 +17,5 @@ var BRANCH_ID int64 = 2 //20954
// CONNECTION - объект Соединение, настроенный // 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 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"

View File

@@ -6,6 +6,7 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"github.com/ManyakRus/starter/constants"
"github.com/ManyakRus/starter/logger" "github.com/ManyakRus/starter/logger"
"github.com/ManyakRus/starter/port_checker" "github.com/ManyakRus/starter/port_checker"
"strings" "strings"
@@ -334,7 +335,8 @@ func GetDSN(ApplicationName string) string {
dsn += "user=" + Settings.DB_USER + " " dsn += "user=" + Settings.DB_USER + " "
dsn += "password=" + Settings.DB_PASSWORD + " " dsn += "password=" + Settings.DB_PASSWORD + " "
dsn += "dbname=" + Settings.DB_NAME + " " 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 dsn += "application_name=" + ApplicationName
return dsn return dsn