I have the following ASP.Net MVC Controller method:
public ActionResult DoSomething(DateTime utcDate)
{
var localTime = utcDate.ToLocalTime();
}
Try the following:
public static DateTime UtcToPacific(DateTime dateTime)
{
return TimeZoneInfo.ConvertTimeFromUtc(dateTime, TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"));
}
Obviously change Pacific to your local timezone.
If you want to find out what time zones are present on your machine see the following link: http://msdn.microsoft.com/en-us/library/bb397781.aspx