I have a data structure where the entity has time stored as int (minutes per day) for quick comparison. The object also has a link to a foreign key back to the TimeZone table, which contains the ID.NET CLR identifier, as well as abbreviated abbreviations Time / Daylight Time.
Since this information is stored as insensitive to the time zone, I was wondering how in LINQ to SQL I could convert it to a UTC DateTime for comparison with other times that will be in UTC.
To make this clear, this conversion must be done on the server side , so that I can filter on SQL Server, not on the client. The reason for this is to ensure that we consider DST for time zones that support it.
I am using .NET 3.5 SP1 and SQL Server 2008.
source share