I am using C# 2.0 to create a windows form application. I have different exchanges of different countries which are in different time zones.
To know their exact time running , I have a timezone field in my database which saves display name of the timezone.
Eg, I have an exchange NASDAQ which is located in New York and hence its timezone i have saved in my db is UTC-05:00 Eastern time(US and Canada).
The problem is that i am picking their time from windows registry at the time when server starts. Some of the machines contains timezone in GMT too. So comparing them with my database is difficult.
Hence i found an alternative that I should just match their offsets rather than matching whole display name. But the new problem arises that how to auto update DayLightSavings time.
Eg, UTC-06:00 Central America does not have any daylight saving time but
UTC-06:00 Mexico City includes 1 hour as daylight saving time.
So If I have an exchange in Central America timezone, its time would be 1 hour before the exchange in Mexico.
Please kindly suggest me how to deal with such issue.