Accept an optional TimeZoneId as an argument to NowDate #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a very naïve attempt to give users the ability to customize the timezone when using the
NowDate
filter. I had a customer request this feature for use with the Email notification step - https://octopus.zendesk.com/agent/tickets/64730And we had some brief discussion in Slack: https://octopusdeploy.slack.com/archives/C033W4273/p1612912152089000
I'm opening this as a draft primarily to help drive discussion. I'm pretty sure that this implementation would break down and not work for chained constructions like:
where the
Format Date
filter is not aware that the previous string was based on some non system local time zone.As far as I can tell, there doesn't appear to be any kind of state or passed context for the entire expression where something like this timezone could live and be referenced, and doing something like that feels like a substantial change to the library.
Interested to hear people's thoughts. Thanks!