diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-12-23 14:01:12 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-12-25 23:54:24 +0000 |
commit | 2018b68a65c32a12ed5f65983212bea175b7a0fa (patch) | |
tree | bc28152577a17e678c0c80ca10de390960c77490 /src/net | |
parent | b116404444addc69b5ec987a2a64b92d4956eab0 (diff) | |
download | go-2018b68a65c32a12ed5f65983212bea175b7a0fa.tar.gz go-2018b68a65c32a12ed5f65983212bea175b7a0fa.zip |
net/mail: don't use MDT in test
When time.Parse sees a timezone name that matches the local timezone,
it uses the local timezone. The tests weren't expecting that,
so using MDT broke with TZ=America/Boise (where MDT means Mountain
Daylight Time). Just use GMT instead.
Fixes #43354
Change-Id: Ida70c8c867e2568b1535d1dfbf1fb0ed9e0e5c1e
Reviewed-on: https://go-review.googlesource.com/c/go/+/280072
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/mail/message_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/mail/message_test.go b/src/net/mail/message_test.go index 0daa3d6c63..80a17b2853 100644 --- a/src/net/mail/message_test.go +++ b/src/net/mail/message_test.go @@ -107,8 +107,8 @@ func TestDateParsing(t *testing.T) { time.Date(1997, 11, 20, 9, 55, 6, 0, time.FixedZone("", -6*60*60)), }, { - "Thu, 20 Nov 1997 09:55:06 MDT (MDT)", - time.Date(1997, 11, 20, 9, 55, 6, 0, time.FixedZone("MDT", 0)), + "Thu, 20 Nov 1997 09:55:06 GMT (GMT)", + time.Date(1997, 11, 20, 9, 55, 6, 0, time.UTC), }, { "Fri, 21 Nov 1997 09:55:06 +1300 (TOT)", @@ -278,8 +278,8 @@ func TestDateParsingCFWS(t *testing.T) { true, }, { - "Fri, 21 Nov 1997 09:55:06 MDT (MDT)", - time.Date(1997, 11, 21, 9, 55, 6, 0, time.FixedZone("MDT", 0)), + "Fri, 21 Nov 1997 09:55:06 GMT (GMT)", + time.Date(1997, 11, 21, 9, 55, 6, 0, time.UTC), true, }, } |