Explicitly set timezone with PostgreSQL timestamps.

This commit is contained in:
Lassi Pölönen 2015-09-10 18:11:49 +03:00
parent 2fa1916521
commit a9aaee6f5a
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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';",