Timeline for How can I get the correct offset between UTC and local times for a date that is before or after DST?
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 9, 2020 at 21:58 | history | edited | Hannah Vernon♦ | CC BY-SA 4.0 |
Replaced the outdated link to MSDN blog with one to the article on the Wayback Machine at archive.org and clarified wording that modern versions have good support for time zones
|
Apr 1, 2016 at 19:18 | comment | added | Frédéric |
CLR gets evil when it must be added WITH PERMISSION_SET = UNSAFE . Some environments do not allow it like AWS RDS. And it is, well, unsafe. Unfortunately, there is no .Net time zone complete implementation which is usable without unsafe permission. See here and here.
|
|
Mar 10, 2015 at 16:57 | comment | added | Solomon Rutzky | Given the actual complexity of regional variations over time, saying it is "decidedly not easy" to attempt this in pure T-SQL is probably understating it ;-). So yes, SQLCLR is the only reliable and efficient means of performing this operation. +1 for that. FYI: the linked blog post is functionally correct but does not follow best practices so is unfortunately inefficient. Functions for converting between UTC and server local time are available in the SQL# library (which I am the author of), but not in the Free version. | |
Nov 8, 2012 at 14:32 | vote | accept | Rachel | ||
Nov 5, 2012 at 13:53 | history | answered | Kevin Feasel | CC BY-SA 3.0 |