With the clock change ahead in Europe – how does SQL Server deal with the clock change? Are there known issues related to a clock change?
SQL Server Timezone – Handling Clock Changes
sql servertimetimezone
Related Question
- Sql-server – MS SQL Server IP address change considerations
- LogShipping and Clock Change in SQL Server
- SSRS 2016 Datasource Connection to SQL Server 2000 Database
- Sql-server – SQL Server Service Account – Things to test post change (from Local System to Network Service)
- SQL Server Memory – Understanding Cache Clock Hands
- Sql-server – What happen with the Log backup if I set the SQL Server clock back
- SQL Server – Estimating Badly
Best Answer
SQL Server just uses the operating system's time. However, if your application code relies on functions like GETDATE(), then your code needs to be able to handle jumps forward (or backward) in time.
For example, if your have code that does something like this:
That code can fail. Long term, consider using GETUTCDATE() instead and storing dates with DATETIMEOFFSET - but that's a big code change that you can't really do quickly before changing the date on a server.