Hi to everybody
I'm working with dates and time, and I can't find the way to determine the
time in a generic TimeZone.
Here's an example of what I'd like to do:
// I get the local date and time
DataTime NowHere = DateTime.Now;
// I retrieve the UTC date and time
DateTime NowUtc = NowHere.ToUniversalTime();
// I instantiate a TimeZone object for a certain place on Earth
TimeZone ZoneThere = ??????
// I retrieve the date and time of that TimeZone
DateTime NowThere = ZoneThere.ToLocalTime(NowUtc);
....I really can't find what to write where I placed the question marks...
I could calculate manually the difference in hours, adding or substracting a
particolar TimeSpan.
In this case, anyway, I have the problem to know the daylight saving time
settings. For the local zone I can write something like;
DateTime.Now.IsDaylightSavingTime()
or
TimeZone.CurrentTimeZone.IsDaylightSavingTime(Date Time.Now)
but for the remote time zone?
....I don't know how to solve this problem...
Many thanks for your help...
Ciao
Michele