Ask a Question

Swagger auto convert date time in UTC

SOLVED
Audric
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

2 REPLIES 2
RonRatovsky
Moderator

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


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓

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.

cancel
Showing results for 
Search instead for 
Did you mean: