opsgenie / opsgenie-go-sdk-v2

Opsgenie GO SDK v2
Apache License 2.0
36 stars 65 forks source link

Change date location to UTC before formatting #113

Closed MarkRosemaker closed 1 month ago

MarkRosemaker commented 2 years ago

For some reason, the time format 2006-01-02T15:04:05.000Z is used instead of the idiomatic time.RFC3339 or time.RFC3339Nano.

This does not work well for different time zones or daylights saving time (playground link).

One solution would be to change the format to time.RFC3339Nano, however there is a risk that the API won't handle the different format.

Instead, we should at least make sure that the time is set to the UTC location.

coveralls commented 2 years ago

Coverage Status

Coverage remained the same at 38.998% when pulling 8c88f07658d4f24e9a04e8f39635ee59cf7aca04 on MarkRosemaker:change-to-UTC into 73fb203b370836a7fdd078e8e9d50d55c190099c on opsgenie:master.

MarkRosemaker commented 2 years ago

Thanks for the approval, @prakhar-mudaiya ! Since I don't have write access, could you merge the PR for me, please?

MarkRosemaker commented 1 year ago

@prakhar-mudaiya what is the process to get this merged, please?