diff --git a/pkg/txt/datetime_test.go b/pkg/txt/datetime_test.go index 8dca3d8d3..2f46bfd1c 100644 --- a/pkg/txt/datetime_test.go +++ b/pkg/txt/datetime_test.go @@ -119,6 +119,11 @@ func TestDateTime(t *testing.T) { assert.Equal(t, "2020-10-17 17:48:24.9508123 +0000 UTC", result.UTC().String()) assert.Equal(t, "2020-10-17 17:48:24.9508123", result.Format("2006-01-02 15:04:05.999999999")) }) + t.Run("2022-09-03T17:48:26-07:00", func(t *testing.T) { + result := DateTime("2022-09-03T17:48:26-07:00", "") + assert.Equal(t, "2022-09-04 00:48:26 +0000 UTC", result.UTC().String()) + assert.Equal(t, "2022-09-03 17:48:26", result.Format("2006-01-02 15:04:05")) + }) } func TestIsTime(t *testing.T) {