alertmanager/notify
Ben Ridley 33a0e77a71
Add timezone support to time intervals. (#2782)
* Add explicit UTC to time interval tests

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Add timezone support to time intervals

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Update time interval documentation with time zone info

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Refactor notification tests to test timezone support

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Make use of Local more clear

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Fix documentation about timezone support.

Makes it clear that the default is UTC, but others are supported.

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Remove commented/unused function

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Fix tests using incorrect timezones

Previously tests were using time zone names that were unsupported by the
RFC822 parser. This switches the tests to use RFC822Z and specifies the
zones by number.

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Add a few more timezone test cases

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Remove unnecessary if/else branch

Co-authored-by: Sylvain Rabot <sylvain@abstraction.fr>
Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Rename timezone to location for consistency with Go stdlib

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Make Windows timezone error more specific

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Update docs to use 'location'

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Apply suggestions from code review

Co-authored-by: Sylvain Rabot <sylvain@abstraction.fr>
Signed-off-by: Ben Ridley <benridley29@gmail.com>

Signed-off-by: Ben Ridley <benridley29@gmail.com>
Co-authored-by: Sylvain Rabot <sylvain@abstraction.fr>
2022-09-22 14:45:17 +02:00
..
email SMTP config: add global and local password file fields (#3038) 2022-09-16 14:36:57 +02:00
opsgenie Remove ioutil 2022-07-18 22:01:02 +09:00
pagerduty Update golangci-lint and fix complaints (#2853) 2022-03-25 17:59:51 +01:00
pushover Update golangci-lint and fix complaints (#2853) 2022-03-25 17:59:51 +01:00
slack Trim contents of slack api urls from files (#2929) 2022-09-09 16:37:31 +02:00
sns Update golangci-lint and fix complaints (#2853) 2022-03-25 17:59:51 +01:00
telegram notify/telegram: Fix test 2022-07-05 13:12:07 +02:00
test Update golangci-lint and fix complaints (#2853) 2022-03-25 17:59:51 +01:00
victorops Update golangci-lint and fix complaints (#2853) 2022-03-25 17:59:51 +01:00
webhook Enable HTTP 2 again (#2720) 2021-11-10 17:28:47 +01:00
wechat Remove ioutil 2022-07-18 22:01:02 +09:00
notify_test.go Add timezone support to time intervals. (#2782) 2022-09-22 14:45:17 +02:00
notify.go Sort receiver stage constructions by pipeline order 2022-04-29 23:59:31 +02:00
util_test.go replace 3 dots with ellipsis (#3072) 2022-09-12 17:28:10 +02:00
util.go replace 3 dots with ellipsis (#3072) 2022-09-12 17:28:10 +02:00