update: helper now save previous time.local value and restore it

Signed-off-by: Mujib Ahasan <ahasanmujib8@gmail.com>
pull/31908/head
Mujib Ahasan 2 weeks ago
parent 13d68bf82d
commit 76f796f2ad

@ -50,6 +50,10 @@ func init() {
func runTestCmd(t *testing.T, tests []cmdTestCase) {
t.Helper()
t.Setenv("TZ", "UTC")
prevLocal := time.Local
t.Cleanup(func() {
time.Local = prevLocal
})
time.Local = time.UTC
for _, tt := range tests {
for i := 0; i <= tt.repeat; i++ {

Loading…
Cancel
Save