Hello! I'm working on a code that uses the opsgenie_sdk
library to interact with Opsgenie. However, I'm having difficulties setting the correct time zone for the Brazil location (America/Sao_Paulo). Currently, the data is being returned in UTC format only. I would like to know how I can adjust the code below to use the Brazil time zone:
import opsgenie_sdk
opsgenie_api_key = '__opsgenie_api_key__'
conf = opsgenie_sdk.configuration.Configuration()
conf.api_key['Authorization'] = opsgenie_api_key
api_client = opsgenie_sdk.api_client.ApiClient(configuration=conf)
alert_api = opsgenie_sdk.AlertApi(api_client=api_client)
start_at = 0
max_results = 100
while True:
list_alerts = alert_api.list_alerts(
query='createdAt = "27-09-2022"',
offset=start_at,
limit=max_results
)
print(list_alerts)
I would appreciate any help you can provide! Currently, the data is only being returned in UTC, and I would like to adjust it to use the Brazil time zone.
Unfortunately none of our API's currently have that functionality, I have raised a feature request you can track it here here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.