Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
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.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900