From 83d67e7fe596a34802d8b98804030aac50de5a0a Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Wed, 8 May 2024 10:04:54 +0200 Subject: [PATCH] Remove implicit date's timezone set on parse --- builtin/builtin.go | 1 - builtin/builtin_test.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/builtin.go b/builtin/builtin.go index 38a6f2f3..9687d7e5 100644 --- a/builtin/builtin.go +++ b/builtin/builtin.go @@ -528,7 +528,6 @@ var Builtins = []*Function{ if err != nil { return nil, err } - t = t.In(tz) return t, nil } diff --git a/builtin/builtin_test.go b/builtin/builtin_test.go index 334910af..b7579153 100644 --- a/builtin/builtin_test.go +++ b/builtin/builtin_test.go @@ -113,7 +113,7 @@ func TestBuiltin(t *testing.T) { {`duration("1h")`, time.Hour}, {`date("2006-01-02T15:04:05Z")`, time.Date(2006, 1, 2, 15, 4, 5, 0, time.UTC)}, {`date("2006.01.02", "2006.01.02")`, time.Date(2006, 1, 2, 0, 0, 0, 0, time.UTC)}, - {`date("2023-04-23T00:30:00.000+0100", "2006-01-02T15:04:05-0700", "America/Chicago").Format("2006-01-02")`, "2023-04-22"}, + {`date("2023-04-23T00:30:00.000+0100", "2006-01-02T15:04:05-0700", "America/Chicago").Format("2006-01-02")`, "2023-04-23"}, {`date("2023-04-23T00:30:00", "2006-01-02T15:04:05", "America/Chicago").Format("2006-01-02")`, "2023-04-23"}, {`date("2023-04-23", "2006-01-02", "America/Chicago").Format("2006-01-02")`, "2023-04-23"}, {`timezone("UTC").String()`, "UTC"},