oncall-engine/engine/apps
Zachary Sistrunk 4afba220ea
Fix issue with DST starting/ending causing overlaps/gaps (#5266)
# What this PR does

This older version of recurring_ical_events does not call the pytz
.normalize() function, which can cause some invalid datetime objects to
return when a DST swap happens. For example: Nov 3, 2024 9:00 AM CDT
instead of the correct 8:00 AM CST). By calling tz.normalize on the end
date and checking if the time zone information changed, we can detect
when DST starts/stops and adjust the end date accordingly.

| | DST stopping on November 3, 2024: | DST starting on March 9, 2024 |

|-|-----------------------------------------|-----------------------------------|
| Before |
![image](https://github.com/user-attachments/assets/933bce80-9b6a-475b-88f2-6356d0e3a6fd)
|
![image](https://github.com/user-attachments/assets/264b816f-6f40-4f14-bbc0-1d03f7b74ac4)
| After |
![image](https://github.com/user-attachments/assets/fbd71991-c4f8-4685-a527-6dbb147b2cb6)
|
![image](https://github.com/user-attachments/assets/ccd932df-2ab4-4472-bc90-045372712f75)
|

## Which issue(s) this PR closes

Closes #5247

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
    show up in the autogenerated release notes.

---------

Co-authored-by: Matias Bordese <mbordese@gmail.com>
2024-11-20 17:04:25 +00:00
..
alerts chore: remove deprecated slack_channel and heartbeat integration types (#5270) 2024-11-20 11:17:04 -05:00
api Enable service account token auth for public API (#5254) 2024-11-19 12:52:23 +00:00
api_for_grafana_incident Allow valid URLs for web image_url template (#5150) 2024-10-10 13:21:36 +00:00
auth_token Enable service account token auth for public API (#5254) 2024-11-19 12:52:23 +00:00
base Reschedule rate limited telegram task instead of retry (#5178) 2024-10-15 13:35:54 +00:00
chatops_proxy update URLs constructed by the backend to support IRM plugin (#5137) 2024-10-09 08:55:10 -04:00
email Inbound email improvements (continued) (#5263) 2024-11-18 12:09:05 +00:00
exotel Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
google feat: convert schedule.channel (char field) to schedule.slack_channel (foreign key) (#5199) 2024-11-04 14:27:21 -05:00
grafana_plugin Enable service account token auth for public API (#5254) 2024-11-19 12:52:23 +00:00
heartbeat chore: remove deprecated slack_channel and heartbeat integration types (#5270) 2024-11-20 11:17:04 -05:00
integrations chore: remove deprecated slack_channel and heartbeat integration types (#5270) 2024-11-20 11:17:04 -05:00
labels fix: update internal labels endpoints to work with RBAC (#5099) 2024-10-02 17:39:49 +00:00
metrics_exporter Split up organizations across metrics exporters (#5127) 2024-10-08 17:29:36 +00:00
mobile_app remove add_stack_slug_to_message_title utility from push notification titles (#5258) 2024-11-15 10:29:00 +00:00
oss_installation feat: update RBAC permissioning to support grafana-irm-app (#5149) 2024-10-10 19:02:21 +00:00
phone_notifications Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
public_api chore: remove deprecated slack_channel and heartbeat integration types (#5270) 2024-11-20 11:17:04 -05:00
schedules Fix issue with DST starting/ending causing overlaps/gaps (#5266) 2024-11-20 17:04:25 +00:00
slack chore: remove deprecated slack_channel and heartbeat integration types (#5270) 2024-11-20 11:17:04 -05:00
social_auth SocialAuthAuthCanceledExceptionMiddleware should only process social … (#5221) 2024-11-04 04:54:47 +00:00
telegram Fix acknowledge reminder task (#5179) 2024-10-16 12:13:28 +00:00
twilioapp Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
user_management chore: remove deprecated AlertGroupPostMortem model + recently refactored/deprecated slack channel related columns (#5240) 2024-11-19 19:23:48 +00:00
webhooks Add manual trigger support for webhooks (#4934) 2024-09-09 12:17:23 +00:00
zvonok Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00