One, local time and UTC time
local time
Each region of the world has its own local time, the entire earth is divided into 24 time zones, each time zone has its own local time.
UTC time
In international radio communications, a standard time is commonly used for unification, known as universal Coordination (UTC, Universal times coordinated). UTC time is the same as the local time in London, UK.
UTC time is the same in all parts of the world, but in different time zones, local time varies. In SQL Sever, GetDate () returns the local time, and getUTCDate () returns the UTC time. UTC time is the same in different time zones, but local time is different.
Two, get local time and UTC time
GetDate () returns the DateTime of the local server, which is related to the OS of the PC on which the instance of SQL Server is located, the same time as the OS displays.
Returns the current database system timestamp as a datetime value without the database time zone offset. This value was derived from the operating system of the computer on which the instance of SQL Server is running.
getUTCDate ()
Returns the current database system timestamp as a datetime value. The database time zone offset is not included. This value represents the current UTC time (coordinated Universal time). This value was derived from the operating system of the computer on which the instance of SQL Server is running.
Third, the time that the SQL Agent executes the job
The time used in the SQL Server agent is local time, one job, and the time it takes to execute is local time.
SQL Server GetDate () and getUTCDate ()