Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTimeOffset -> conversion from UTC to local machine time zone #4838

Closed
KlausEnevoldsen-Abtion opened this issue Jun 17, 2024 · 2 comments
Closed
Labels
Csharp Pull requests that update .net code Status: No Recent Activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:bug A broken experience

Comments

@KlausEnevoldsen-Abtion
Copy link

KlausEnevoldsen-Abtion commented Jun 17, 2024

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Nuget tool

Client library/SDK language

C#/.NET

Describe the bug

Latest version of Kiota. I am trying to use an Kiota client for an API endpoint that returns MinValue of DateTimeOffset and because my timezone is UTC+1 the deserialization fails because MinValue - 1 hour is not a valid value.

The API endpoint actually has an option of returning null, but it insists on returning MinValue. I have reached out to the API author in hopes of changing their implementation of this edge case.

My workaround for now is to change the property from DateTimeOffset? to string.

Is there another way to fix this situation without changing the API or the generated code?

Expected behavior

The code does not break

How to reproduce

  1. Create an endpoint that returns a DateTimeOffset.MinValue
  2. Generate a Kiota client
  3. Make sure your machine is UTC+ timezone

Open API description file

No response

Kiota Version

1.15.0

Latest Kiota version known to work for scenario above?(Not required)

No response

Known Workarounds

As described above

Configuration

No response

Debug output

Click to expand log ```
</details>


### Other information

_No response_
@KlausEnevoldsen-Abtion KlausEnevoldsen-Abtion added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Jun 17, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Jun 17, 2024
@baywet
Copy link
Member

baywet commented Jun 17, 2024

Hi @KlausEnevoldsen-Abtion
Thanks for using kiota and for reaching out.
This sounds like another bug that was reported by a community member not long ago
Can you have a look and let us know if your problem is indeed the same please?

@baywet baywet added Csharp Pull requests that update .net code status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Jun 17, 2024
@baywet baywet moved this from Needs Triage 🔍 to Waits for author 🔁 in Kiota Jun 17, 2024
@baywet baywet added this to the Backlog milestone Jun 17, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service microsoft-github-policy-service bot removed this from the Backlog milestone Jun 24, 2024
@github-project-automation github-project-automation bot moved this from Waits for author 🔁 to Done ✔️ in Kiota Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Csharp Pull requests that update .net code Status: No Recent Activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:bug A broken experience
Projects
Archived in project
Development

No branches or pull requests

2 participants