Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
m-team
oidc
mytoken
server
Commits
61fdebf4
Unverified
Commit
61fdebf4
authored
1 year ago
by
Gabriel Zachmann
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Plain Diff
fix wrong dates when db uses non-UTC tz (#232)
parents
5f7f62aa
fabb8c71
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#323431
failed
1 year ago
Stage: build
Stage: test
Stage: lint
Stage: release
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
internal/db/cluster/cluster.go
+2
-1
2 additions, 1 deletion
internal/db/cluster/cluster.go
with
3 additions
and
1 deletion
CHANGELOG.md
+
1
−
0
View file @
61fdebf4
...
...
@@ -31,6 +31,7 @@
### Bugfixes
-
Fixed a bug where wrong dates where returned if the database used a different timezone than UTC.
-
Fixed a bug in
`mytoken-migratedb`
were empty databases could not be setup.
### Dependencies
...
...
This diff is collapsed.
Click to expand it.
internal/db/cluster/cluster.go
+
2
−
1
View file @
61fdebf4
...
...
@@ -154,7 +154,8 @@ func connectDSN(dsn string) (*sqlx.DB, error) {
db
.
SetConnMaxLifetime
(
time
.
Minute
*
4
)
db
.
SetMaxOpenConns
(
10
)
db
.
SetMaxIdleConns
(
10
)
return
db
,
nil
_
,
err
=
db
.
Exec
(
`SET time_zone="+0:00"`
)
return
db
,
err
}
// Transact does a database transaction for the passed function
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment