Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

timezone issue in date time field

$
0
0

Hi,

I am calling a web service and the response contains multiple elements with xsd=date type. Now  xsd.exe generates DateTime fields for all of these elements

I am using XML Serializer to deserialize the response of the webservice. All these DateTime fields are returning the timezone like 2017-10-10T20:30:00-04:00.

After deserialization, the datetime fields are getting converted to local time and we don't have a way to get only the actual date and time 2017-10-10T20:30:00. We can't ask the webservice team to remove the time zone from the response, nor we can modify the generated classes from xsd.exe, as we have multiple date time fields.

Please suggest how can I get the actual date & time after desrialization or can we force XMLSerializer not to use timezone to convert to local time.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>