Question: How can I output the current time in California from my website?

I want visitors to know the current time for my application.

Answer: 
```
TimeZoneInfo pacificZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
DateTime pacificTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, pacificZone);

```

The advantage of this is that it doesn't depend on what time zone the server is currently set to.
Is your server located in California? If so, then `DateTime.Now` will return the current time in the current timezone.

If not, you can either hard-code the offset from UTC of California and use `DateTime.UtcNow.AddHours(offset)` or you can use a database such as the [tz database](http://www.twinsun.com/tz/tz-link.htm) which will help with things like automatically adjusting for daylight savings and so on.

There is also the [TimeZoneInfo](http://msdn.microsoft.com/en-us/library/system.timezoneinfo.aspx) class, introduced in .NET 3.5 that lets you enumerate the timezone information installed into windows. You should be able to calculate it from that as well.