Skip to content

Commit 4398e9f

Browse files
committed
windows tz debug
1 parent 7fd13df commit 4398e9f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

coderd/util/tz/tz_windows.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
package tz
44

55
import (
6+
"encoding/json"
7+
"fmt"
8+
"os"
69
"os/exec"
710
"strings"
811
"time"
@@ -44,6 +47,10 @@ func TimezoneIANA() (*time.Location, error) {
4447
if len(outLines) < 2 {
4548
return nil, xerrors.Errorf("unexpected output from powershell command %q: %q", cmdTimezone, outLines)
4649
}
50+
51+
_, _ = fmt.Printf("%#v\n", outLines)
52+
_ = json.NewEncoder(os.Stdout).Encode(outLines)
53+
4754
// What we want is the second line of output
4855
locStr := strings.TrimSpace(outLines[1])
4956
loc, err = time.LoadLocation(locStr)

0 commit comments

Comments
 (0)