I would love to insert a default value into a column with data type datetime2(7). However, because my website is hosted on a server in a different timezone, the getdate func
You can use SYSDATETIMEOFFSET
function
select SYSDATETIMEOFFSET()
MSDN description:
Returns a datetimeoffset(7) value that contains the date and time of the computer on which the instance of SQL Server is running. The time zone offset is included.
More on MSDN.
Based on clarification in the comment below:
Because you want to store the local time of the client, SQL Server has no way of knowing what is your local time. The best option that would work best would be to send the current time from the client each time.