You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
Terraform v1.3.7
on darwin_amd64
Description
Like #33 adding time zone support including daylight savings changes would be greatly appreciated.
I am aware of using the the timeadd() and formatdate() functions route, but AFAICT you're hardcoding the time zone offset this way and thus it requires manual intervention around daylight savings. Fully aware of the intricacies around time and time zones, I'd only suggest an approach using existing libraries:
Just like with time_rotating the daylight savings change would only occur when Terraform is executed, meaning there will be drift between the time_static timestamp and actual daylight savings.
New or Affected Resource(s)
time_static would get a new time_zone optional argument
Nice to have:
I find the timeadd()+formatdate() workaround to be very problematic due to time zones changing all the time, daylight savings not necessarily being the same across time zones (some don't have it at all, or just in some years). Additionally, the current timezone may not be suitable to calculate a different timezone. I am very much for implementing a way that uses tzdata or some other battle-tested standard under the hood.
Community Note
Terraform Version
Terraform v1.3.7
on darwin_amd64
Description
Like #33 adding time zone support including daylight savings changes would be greatly appreciated.
I am aware of using the the
timeadd()
andformatdate()
functions route, but AFAICT you're hardcoding the time zone offset this way and thus it requires manual intervention around daylight savings. Fully aware of the intricacies around time and time zones, I'd only suggest an approach using existing libraries:One way about it would be to require locations and utilize Go's standard time zone support: https://pkg.go.dev/time#LoadLocation
Though I'd prefer to be able to support timezone abbreviations by depending on https://pkg.go.dev/github.com/tkuchiki/go-timezone.
Just like with
time_rotating
the daylight savings change would only occur when Terraform is executed, meaning there will be drift between the time_static timestamp and actual daylight savings.New or Affected Resource(s)
Nice to have:
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: