I took marc_s one step further - here is the code for creating a simple time zone table and .net code that generates inserts for each entry in UTC format:
CREATE TABLE [dbo].[TimeZones] (
[TimeZoneID] INT IDENTITY (1, 1) NOT NULL,
[DisplayName] VARCHAR(100) NOT NULL,
[StandardName] VARCHAR (100) NOT NULL,
[HasDST] BIT NOT NULL,
[UTCOffset] INT NOT NULL
CONSTRAINT [PK_TimeZones] PRIMARY KEY CLUSTERED ([TimeZoneID] ASC)
);
GO
, webnet visual studio , , , ( , html):
System.Collections.ObjectModel.ReadOnlyCollection<TimeZoneInfo> timeZones = TimeZoneInfo.GetSystemTimeZones();
foreach (TimeZoneInfo timeZone in timeZones)
{
Response.Write("INSERT INTO TimeZones (DisplayName, StandardName, HasDST, UTCOffset) VALUES ('" + timeZone.DisplayName.Replace("'", "''") + "', '" + timeZone.StandardName.Replace("'", "''") + "', '" + timeZone.SupportsDaylightSavingTime + "', '" + timeZone.BaseUtcOffset + "')" + Environment.NewLine);
}
,