public string getDateTime(string dat, string format) { string _ret = ""; try { DateTime dt = Convert.ToDateTime(dat); string serverlocal = "Pacific Standard Time";// TimeZoneInfo.Local.Id; string clientLocal = Convert.ToString(HttpContext.Current.Session["TZ"]); _ret = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(dt, serverlocal, clientLocal).ToString(format); } catch (Exception ex) { } return _ret; }
string clientLocal = Convert.ToString(HttpContext.Current.Session["TZ"]);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)