Hi Martin,
We have analyzed the reported issue and it is due to time zone offset problem. When stringify the UTC date format, it is convert with time zone offset variation. Hence, we get basline date value has one date difference. To overcome this problem, we have to pass the baseline date values to Convert.ToDateTime() method and it will be convert back as original date value.
Please refer following code snippet,
public string GetOriginalDate(string date)
{
DateTime convertedDate = Convert.ToDateTime(date);
return (convertedDate.Month + "/" + convertedDate.Day + "/" + convertedDate.Year);
} |
We have prepared a sample for your reference. In the server side, we have a method called “GetOriginalDate”. It will return original date in string format and add it to the database.
Please find the sample location as below,
To know more about time zone offset,
Please let us know, if you require any other assistance.
Regards,
Jayakumar D