In .NET 3.5, there is TimeZoneInfo
, which provides a lot of functionality in this area; 2.0SP1 has DateTimeOffset
, but this is much more limited.
Getting UtcNow
and adding a fixed offset is part of the job, but isn’t DST-aware.
So in 3.5 I think you can do something like:
DateTime eastern = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(
DateTime.UtcNow, "Eastern Standard Time");
But this simply doesn’t exist in 2.0; sorry.