Skip to content

Commit

Permalink
Use a valid timezone in tested binary (#3527)
Browse files Browse the repository at this point in the history
With recent changes to debian/ubuntu tzdata package, the Mexico/BajaSur is not valid anymore (not present by default). It is now present in the tzdata-legacy package, which is not a essential package. Without this timezone, the call to time.LoadLocation() will send a nil location, which will provoke a panic in time.ParseInLocation(). This change uses the underlying associated timezone America/Mazatlan.
  • Loading branch information
upils committed Oct 12, 2023
1 parent 6185e67 commit 70f21c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _fixtures/testvariables2.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func main() {

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

0 comments on commit 70f21c9

Please sign in to comment.