cancel
Showing results for 
Search instead for 
Did you mean: 

Swagger auto convert date time in UTC

SOLVED
New Contributor

Swagger auto convert date time in UTC

Hello,

 

I've got a problem using Swagger for my API.

In a in-parameter (of a GET method), I've got a datetime that people can give to the API, for example '2019-03-22T23:00:00Z'.


But when I look at what swagger API receive in the parameter, I've got '2019-03-23 01:00:00'.
It look like swagger want to convert it in UTC datetime, but what I want it's just to keep the same datetime value, without using the time zone.

 

The date have one day difference and that's very annoying for me...

 

How can I do ?
Thanks !

Audric

1 ACCEPTED SOLUTION

Accepted Solutions
New Contributor

Re: Swagger auto convert date time in UTC

Hello,

 

I'm sorry, I didn't know that.
I'm using the package Nuget SwashBuckle AspNetCore with the web interface for my .Net/C# API.

Thanks !

EDIT : it look like it's not due to swagger but JSON formatter. I close it.

2 REPLIES 2
Highlighted
Moderator

Re: Swagger auto convert date time in UTC

Swagger is a set of tools, not a specific one. Which one are you referring to?

New Contributor

Re: Swagger auto convert date time in UTC

Hello,

 

I'm sorry, I didn't know that.
I'm using the package Nuget SwashBuckle AspNetCore with the web interface for my .Net/C# API.

Thanks !

EDIT : it look like it's not due to swagger but JSON formatter. I close it.

New Here?
Join us and watch the welcome video:
Top Kudoed Authors