diff options
Diffstat (limited to 'pkg/machine/ignition_darwin.go')
-rw-r--r-- | pkg/machine/ignition_darwin.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/machine/ignition_darwin.go b/pkg/machine/ignition_darwin.go new file mode 100644 index 000000000..9ede4b026 --- /dev/null +++ b/pkg/machine/ignition_darwin.go @@ -0,0 +1,16 @@ +//+build darwin + +package machine + +import ( + "os" + "strings" +) + +func getLocalTimeZone() (string, error) { + tzPath, err := os.Readlink("/etc/localtime") + if err != nil { + return "", err + } + return strings.TrimPrefix(tzPath, "/var/db/timezone/zoneinfo"), nil +} |