Skip to content

Commit

Permalink
proc: fix TestEvalExpression on Windows (#3313)
Browse files Browse the repository at this point in the history
On Windows the TZ environment variable does not affect the timezone of
time.Time variables created using time.Unix. Find another way to make
the test pass on our windows/arm64 builder (which is not set to the UTC
timezone).
  • Loading branch information
aarzilli committed Mar 30, 2023
1 parent efb119d commit 4c40e81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _fixtures/testvariables2.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"go/constant"
"math"
"reflect"
"os"
"reflect"
"runtime"
"time"
"unsafe"
Expand Down Expand Up @@ -367,7 +367,7 @@ func main() {
w5.W5 = w5

os.Setenv("TZ", "UTC")
tim1 := time.Unix(233431200, 0)
tim1 := time.Unix(233431200, 0).UTC()
loc, _ := time.LoadLocation("Mexico/BajaSur")
tim2, _ := time.ParseInLocation("2006-01-02 15:04:05", "2022-06-07 02:03:04", loc)
typedstringvar := String("blah")
Expand Down

0 comments on commit 4c40e81

Please sign in to comment.