mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
Fix Issue with Lost Timezone in Metadata for Database Secret Engines (#28509)
* Set cron schedule location after pulling from storage * Add changelog
This commit is contained in:
parent
8d6d26e531
commit
b861d8b03f
2 changed files with 7 additions and 0 deletions
|
|
@ -268,6 +268,10 @@ func (b *databaseBackend) pathStaticCredsRead() framework.OperationFunc {
|
|||
if role.StaticAccount.RotationWindow.Seconds() != 0 {
|
||||
respData["rotation_window"] = role.StaticAccount.RotationWindow.Seconds()
|
||||
}
|
||||
|
||||
// The schedule is in UTC, but we want to convert it to the local time
|
||||
role.StaticAccount.Schedule.Location = time.Local
|
||||
respData["ttl"] = role.StaticAccount.CredentialTTL().Seconds()
|
||||
}
|
||||
|
||||
switch role.CredentialType {
|
||||
|
|
|
|||
3
changelog/28509.txt
Normal file
3
changelog/28509.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
databases: fix issue where local timezone was getting lost when using a rotation schedule cron
|
||||
```
|
||||
Loading…
Reference in a new issue