override API vs GUI time is not accurate

Hi All,

First I would like to explain that the timezone on PagerDuty UI is set to UTC+2 (Cairo) for all the Schedules and for the users.

When I try the override API here: https://developer.pagerduty.com/api-reference/reference/REST/openapiv3.json/paths/~1schedules~1{id}~1overrides/post

or call my API from an external application (exactly the same behavior happens) with TZ Africa/Cairo.

The current schedule I have from the GUI is: From: Jun 19 at 14:00 To: Jun 20 at 04:00

The post override is:

POST override:
“start”: “2021-06-19T00:00:00-14:00”,
“end”: “2021-06-20T00:00:00-04:00”,

The response is:

“start”: “2021-06-19T14:00:00Z”,
“end”: “2021-06-20T04:00:00Z”,

Which from above seems correct, but when I check the GUI, the override is the below which is incorrect:

Jun 19 at 16:00 - Jun 20 at 06:00

So I am not sure what I am doing wrong here if someone can help!

Thank you!

Hey there!

Thanks for your post. My name is Ryan and I am on the PagerDuty technical support team.

Looking at your POST, it looks as though you are mixing time zones.

Your call:

"start": "2021-06-19T00:00:00-14:00",
"end": "2021-06-20T00:00:00-04:00",

This is saying to start the shift on 6/19 at midnight (UTC -14) and then end the shift on 6/20 at midnight (UTC -4).

Take a look at the section “DateTime” in this document: https://developer.pagerduty.com/docs/rest-api-v2/types/

You would need to define consistent timezones across start and end to get the result you are looking for.

I hope this helps! Let us know if you have any other questions.


Ryan Viera
Technical Support Specialist

Hi Ryan,

Thank you so much for your help, I am surely was confusing for the last part as I thought it is the time not the time zone part!

so when I tried this format it returned what is expected:


However, I am confused with one thing, I was under the impression that if I used the time_zone=Africa/Cairo it would take care of the TZ, or is it a must that I need to include it with the -02:00?

I have tried the API with:


And included time_zone=Africa/Cairo but still returned on GUI:

Jun 19 at 16:00 - Jun 20 at 06:00

Hey there,

Yes, you would still need to specify the time zone in the call. Cairo is UTC +2:00 though, and it looks like you have it as -2:00.

Let me know if that solves the issue!


Ryan Viera
Technical Support Specialist

Actually in my case the correct is to put -2:00 to reflect correctly.

And yes it answer my question, thank you so much for ur help! appreciate it!