I just need to make a SQL table of time zones – at this point, my only need is to populate a drop-down list on an online form. I’m envisioning something simple with columns for ISO code, name, UTC offset, and perhaps a list of representative cities. I thought I would be able to easily find something online to copy-and-paste, but haven’t been able to locate anything.
I was directed by this question to the tz database, which is in binary form and seems like overkill for what I need. Alternatively I could piece this together from sites like TimeAndDate.com, but that seems like more work than should be necessary.
Or am I going about this the wrong way – e.g. should I be getting this information from the server’s OS?
Are you on .NET 3.5 ? You can easily get a list of timezones in .NET 3.5 and then store that information (or at least whatever you need of it) in your SQL Server database.
You could iterate over all timezones available and known to .NET 3.5 and store the relevant info to a SQL Server table:
Marc