Skip to content

Commit 42ff6c6

Browse files
committed
Add More Tests for Preserving Timezone
Add test when timezone is used to parse a date-time. Add test when timezone is irrelevant because it's a date.
1 parent 50d0297 commit 42ff6c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin/builtin_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ func TestBuiltin(t *testing.T) {
114114
{`date("2006-01-02T15:04:05Z")`, time.Date(2006, 1, 2, 15, 4, 5, 0, time.UTC)},
115115
{`date("2006.01.02", "2006.01.02")`, time.Date(2006, 1, 2, 0, 0, 0, 0, time.UTC)},
116116
{`date("2023-04-23T00:30:00.000+0100", "2006-01-02T15:04:05-0700", "America/Chicago").Format("2006-01-02")`, "2023-04-22"},
117+
{`date("2023-04-23T00:30:00", "2006-01-02T15:04:05", "America/Chicago").Format("2006-01-02")`, "2023-04-23"},
118+
{`date("2023-04-23", "2006-01-02", "America/Chicago").Format("2006-01-02")`, "2023-04-23"},
117119
{`first(ArrayOfString)`, "foo"},
118120
{`first(ArrayOfInt)`, 1},
119121
{`first(ArrayOfAny)`, 1},

0 commit comments

Comments
 (0)