Sharing: AUDTTIME to local time via SQL

I needed to convert the Sage 300 time field to locale time in a SQL query.  I put the following together from a Stack Overflow post.  It, however, doesn't take daylight savings into account (and apparently that's not the easiest thing to do).

SELECT DATEADD(mi, DATEDIFF(mi, GETUTCDATE(), GETDATE()), CAST(STUFF(STUFF(STUFF(RIGHT('00000000' + CAST(AUDTTIME AS VARCHAR),8),3,0,':'),6,0,':'),9,0,'.') AS TIME))
       AS AuditTimeInLocal
FROM YourTableHere

Parents Reply Children