I'm trying to make my SQL Server use the Olson time zones instead of the Windows ones.
The web doesn't really give an answer on how to do it and make it system wide.
I don't know if that's possible to make it the default, and how to do it, or if I just should move to a different database provider but since my current infrastructure uses SQL Server I'd like to know if it is possible nonetheless.
If it's possible, I'd like to know how to do it locally but also when I'll be migrating it to an Azure SQL Server instance.
1条答案
按热度按时间roqulrg31#
You can create a mapping table of Olson time zones to Windows time zones, and then use a function to convert.
For example
Then create an inline Table Valued Function to query it
You can then do a simple
SELECT
, or you canCROSS APPLY
it from another table.This fiddle has data that has been pulled from the official Unicode Github repo .