问题
How can I get time zones list in Microsoft SQL Server 2008R2?
回答1:
Using time zone data in SQL Server 2008
http://blogs.msdn.com/b/sqlprogrammability/archive/2008/03/18/using-time-zone-data-in-sql-server-2008.aspx.
If I understand the blog entry correctly, there is no time zones list in SQL Server 2008 R2, because there is no internationally recognized standard for such a list. Instead, Microsoft offers a datetimeoffset data type, which allows you to work with numeric time zone offsets.
However, the article does offer some tentative solutions for building your own time zone list. In particular, it offers an example program that uses a .NET library to write data from the Olson Timezone database (http://www.twinsun.com/tz/tz-link.htm) into a table, which can then be imported into SQL Server.
来源:https://stackoverflow.com/questions/10213534/get-time-zones-in-sql-server-2008-r2