-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
Description
A rule that checks for GETDATE(), SYSDATETIME(), etc. usage that is dependent on the OS's settings for time zones. Best practice would be to utilize strict UTC (SYSUTCDATETIME(), etc.) and convert from there (inline or in client) as needed. This avoids issues from changes made outside of the SQL Server instance and follows broad best practice wisdom to store/use UTC wherever possible.
sys.time_zone_info can help greatly with this best practice approach and is available on 2016+. The only version in current support without it is 2014 (until 2024), so this best practice approach should be feasible for most MS supported installs.