Open
Description
I have tests that rely on time, I've normally normalized this by patching the time to a fixed value
func init() {
_, _ = mpatch.PatchMethod(time.Now, func() time.Time {
return time.Date(1980, 01, 01, 00, 00, 00, 0, time.UTC)
})
}
where the error returned is permission denied
Seems like this it doesn't work with Go 1.22.1 as the moment I upgraded Go versions all the tests that rely on that fixed time failed. Works fine if I revert back to ~1.21.0
Breaks on both Mac and Linux
Metadata
Metadata
Assignees
Labels
No labels