mirror of
https://github.com/golang/go.git
synced 2025-10-20 11:33:18 +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
1 changed files with 4 additions and 4 deletions
|
@ -107,8 +107,8 @@ func TestDateParsing(t *testing.T) {
|
||||||
time.Date(1997, 11, 20, 9, 55, 6, 0, time.FixedZone("", -6*60*60)),
|
time.Date(1997, 11, 20, 9, 55, 6, 0, time.FixedZone("", -6*60*60)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Thu, 20 Nov 1997 09:55:06 MDT (MDT)",
|
"Thu, 20 Nov 1997 09:55:06 GMT (GMT)",
|
||||||
time.Date(1997, 11, 20, 9, 55, 6, 0, time.FixedZone("MDT", 0)),
|
time.Date(1997, 11, 20, 9, 55, 6, 0, time.UTC),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Fri, 21 Nov 1997 09:55:06 +1300 (TOT)",
|
"Fri, 21 Nov 1997 09:55:06 +1300 (TOT)",
|
||||||
|
@ -278,8 +278,8 @@ func TestDateParsingCFWS(t *testing.T) {
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Fri, 21 Nov 1997 09:55:06 MDT (MDT)",
|
"Fri, 21 Nov 1997 09:55:06 GMT (GMT)",
|
||||||
time.Date(1997, 11, 21, 9, 55, 6, 0, time.FixedZone("MDT", 0)),
|
time.Date(1997, 11, 21, 9, 55, 6, 0, time.UTC),
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue