From 1de799486e0db8788bef15b60dc250e20812796b Mon Sep 17 00:00:00 2001 From: Pink Duck Date: Wed, 17 Feb 2016 16:09:05 +0000 Subject: [PATCH] Handle NULL option as default If NULL is supplied to the @FirstOnFallBackOverlap parameter then the function uses the non-default action instead of the default. For this reason I have added a check for NULL. It is okay for the @SkipOnSpringForwardGap case as there is a test against 0 that requires it to be explicitly set for non-default behaviour. --- Database/Functions/LocalToUtc.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database/Functions/LocalToUtc.sql b/Database/Functions/LocalToUtc.sql index 353bab6..669740f 100644 --- a/Database/Functions/LocalToUtc.sql +++ b/Database/Functions/LocalToUtc.sql @@ -13,7 +13,7 @@ BEGIN DECLARE @ZoneId int SET @ZoneId = [Tzdb].GetZoneId(@tz) - IF @FirstOnFallBackOverlap = 1 + IF @FirstOnFallBackOverlap = 1 OR @FirstOnFallBackOverlap IS NULL SELECT TOP 1 @OffsetMinutes = [OffsetMinutes] FROM [Tzdb].[Intervals] WHERE [ZoneId] = @ZoneId