Having just an offset and whether or not it's in daylight saving time isn't really enough to indicate a time zone: there can be several time zones with the same standard offset and DST offset, but which have DST transitions at different times.
Is this data already in the database, or are you still designing it? Ideally you should store a time zone ID - the ones TimeZoneInfo
works with are Windows IDs, which isn't ideal IMO (I prefer the Olson IDs that the rest of the industry tends to work with) but at least it does represent a real time zone.
Once you've got a TimeZoneInfo
and an instant that you want to convert, ConvertTimeFromUtc
and ConvertTimeToUtc
are probably what you're after - but be careful about what you mean by "any date time value"; you need to make sure you always know exactly what you're representing. The BCL is somewhat woolly on all of this, which is one of the reasons I started Noda Time. Unfortunately Noda Time isn't even nearly ready for production use yet. (It's probably okay for simple conversions like this, but there's a whole heap of other missing functionality at the moment.)