i am in a zone where the local time is GMT +6. now how can i get the appropriate time from a json time string accroding to my zone. i tried the following approach but it returns a date with a day off(one day previous date).
public ActionResult DateParser(string date)
{
string sDate = WrapStringInQuotes(date);
DateTime dt = JsonConvert.DeserializeObject<DateTime>(sDate); // the dt i want have to be gmt +6
}
public string WrapStringInQuotes(string input)
{
return @"""" + input + @"""";
}
I tried for help here but didn't understand how can i get the appropriate date.
While i convert the json string date Here it decoded the date as per as my time zone.