There is no magical global offset variable that will change the time reported by SQL Server for a a session. If you think about it, you'll notice that variables declared in a procedure never affect the server. You'd need something in, say, the SET command to do that.
I assume the application provides the offset, based on the TZ database or equivalent, and you just want to apply it as easily as possible. What you could do is wrap getdate()
with a new function localedate()
that accepts as input the offset and applies it to getdate()
with dateadd()
.
Bear in mind that dates saved in the database have no associated time zone. Localizing them would be a bigger undertaking.