Using C #, when I run this:
Convert.ToDateTime("Wed, 20 May 2015 01:36:39 +0000")
It returns me this:
{19/05/2015 22:36:39}
Date: {19/05/2015 00:00:00}
How do you return it to the correct value?
Using C #, when I run this:
Convert.ToDateTime("Wed, 20 May 2015 01:36:39 +0000")
It returns me this:
{19/05/2015 22:36:39}
Date: {19/05/2015 00:00:00}
How do you return it to the correct value?
It seems like Convert.ToDateTime
is converting the original date to UTC for a local date.
Checks whether Kind
property equals DateTimeKind.Local
.
If it is, you have to convert the date to UTC again
date = date.ToUniversalTime();