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:
Luis (LT) Carbonell
2024-09-25 18:40:50 -04:00
committed by GitHub
parent 8d6d26e531
commit b861d8b03f
2 changed files with 7 additions and 0 deletions

View File

@@ -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
View File

@@ -0,0 +1,3 @@
```release-note:bug
databases: fix issue where local timezone was getting lost when using a rotation schedule cron
```