Specify timezone for OffPeak intervals
Description
!345 (merged) added OffPeak support for autoscaling. Unfortunately, the new configuration is always specified in the local timezone of the runner machine. That is inconvenient for a few reasons:
- The prime use case of OffPeak is related to business hours. Timezones of machines are not necessarily related to that of its users. Consequently the config will often show unintuitive hours.
- The timezones of machines are not always predictable (or known in advance). Especially in cloud environments the machine timezones in one region may be different from those in other regions. Replacing the base image may change the timezone. That means that we can't re-use the config without changing the OffPeak section.
- Business hours, when translated to the machine's timezone may not be constant. For instance, our company is located in Europe/Berlin. Our servers are mostly configured to be in UTC. Since Europe/Berlin observes DST, our business hours in UTC are 6-16 in the summer and 7-17 during the winter. We don't want to have to change the runner config twice a year to maintain its behaviour.
Proposal
Add a runner option, "OffPeakTimezone" perhaps, that specifies the timezone for all configured periods. Acceptable values should be fully named timezones, such as "Europe/Berlin", "America/Los_Angeles", "UTC". Note that many of the frequently used acronyms are ambiguous (ctrl+f, "CST") and should be discouraged if not forbidden.
Links to related issues and merge requests / references
- !345 (merged) Add OffPeak support for autoscaling, fixing #1715 (closed)