I have a hidden field in my master page. And I set the current date and time as a value in that \"hiddenfield\" using Javascript. I am unable to get this hidden field value
Below is the javascript function to get client current datetime:
You can also get OffSet Time from code behind as below:
public static TimeSpan GetOffSetTime(string date)
{
DateTime d = Convert.ToDateTime(date);
TimeZone zone = TimeZone.CurrentTimeZone;
TimeSpan local = zone.GetUtcOffset(d);
return local;
}