Currently I have a function:
CREATE FUNCTION USER.sysdate () RETURNS DATETIME AS
BEGIN
DECLARE @Result DATETIME
SELECT @Result = DATEADD(hour, -5, getdate())
RETURN @Result
END
;
But it doesn't take into account DST. And then I realized UK has daylight saving too, so I need to deal with 2 DST. In order to build a function without manually changing "-5" to "-6" or "-4" around DST, anybody has any good ideas?
Thanks!