forked from prometheus/alertmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add timezone support to time intervals. (prometheus#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> Signed-off-by: Yijie Qin <qinyijie@amazon.com>
- Loading branch information
Showing
4 changed files
with
219 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.