Explicitly set timezone with PostgreSQL timestamps.
This commit is contained in:
parent
2fa1916521
commit
a9aaee6f5a
|
@ -63,7 +63,7 @@ func (b *backend) pathRoleCreateRead(
|
|||
password := uuid.GenerateUUID()
|
||||
expiration := time.Now().UTC().
|
||||
Add(lease.Lease + time.Duration((float64(lease.Lease) * 0.1))).
|
||||
Format("2006-01-02 15:04:05")
|
||||
Format("2006-01-02 15:04:05-0700")
|
||||
|
||||
// Get our connection
|
||||
db, err := b.DB(req.Storage)
|
||||
|
|
|
@ -67,7 +67,7 @@ func (b *backend) secretCredsRenew(
|
|||
// Make sure we increase the VALID UNTIL endpoint for this user.
|
||||
if expireTime := resp.Secret.ExpirationTime(); !expireTime.IsZero() {
|
||||
expiration := expireTime.Add(10 * time.Minute).
|
||||
Format("2006-01-02 15:04:05")
|
||||
Format("2006-01-02 15:04:05-0700")
|
||||
|
||||
query := fmt.Sprintf(
|
||||
"ALTER ROLE %s VALID UNTIL '%s';",
|
||||
|
|
Loading…
Reference in a new issue