1
I have a date conversion problem in WCF.
I get a Json a Datetime in Unix format
"\/Date(1477320927000)\/" - 24-10-2016 12:55:27.
Wcf receives this date as 24-10-2016 14:55:27.
This giving a difference of 2 hours.
I tried to use TimeZone
, CultureInfo
, DateTimeKind
, DateTimeOffSet
, etc.. But nothing worked or puts a 1 to less or 2 hours more.
Someone knows how to fix this?
Post the code you’re using..
– Marco Giovanni
In fact what happens is that the date goes right and it goes wrong in WCF. Basically what I did was: dataReceived.Tolocaltime(); Datetime.Specifykind(dataReceived, Datetimekind.Unspecified)..
– user2199469
Is that '1477320927000' is equivalent to '24 Oct 2016 14:55:27', can test here, to test remove the last 3 digits ex: '1477320927',
– Marco Giovanni
I believe this converter is not validating the Timezone, look at this link. In this is displayed the two forms.
– user2199469