Use UTC for saving times #11
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"embed"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.anthrove.art/Anthrove/otter-space-sdk/v4/internal/utils"
|
||||
otterError "git.anthrove.art/Anthrove/otter-space-sdk/v4/pkg/error"
|
||||
@ -66,9 +65,6 @@ func Connect(ctx context.Context, config models.DatabaseConfig) error {
|
||||
dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%d sslmode=%s TimeZone=%s", config.Endpoint, config.Username, config.Password, config.Database, config.Port, localSSL, config.Timezone)
|
||||
sqlDB, err := gorm.Open(postgres.Open(dsn), &gorm.Config{
|
||||
TranslateError: true,
|
||||
NowFunc: func() time.Time {
|
||||
return time.Now().UTC()
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return utils.HandleError(ctx, span, localLogger, err)
|
||||
|
Loading…
Reference in New Issue
Block a user