I'm currently migrating my system to Azure SQL so I need to convert the time zone from the UTC standard to the local time zone when using GETDATE(). This is straight forward with 'AT TIME ZONE..', however we also have a couple of clients who host themselves on machines running SQL Server pre-2016.
Is there any way in SQL that one function could be setup to get the time zone that'd work for both?