* Refactor: Move `inTimeIntervals` from `notify` to `timeinterval`
There's absolutely no change of functionality here and I've expanded coverage for similar logic in both places.
---------
Signed-off-by: gotjosh <josue.abreu@gmail.com>
* 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>