mirror of
https://github.com/golang/go
synced 2024-07-03 08:51:14 +00:00
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>
This commit is contained in:
parent
b116404444
commit
2018b68a65
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user