We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a90fad3 commit ac6080bCopy full SHA for ac6080b
pkg/machine/ignition/ignition.go
@@ -147,9 +147,13 @@ func (ign *DynamicIgnition) GenerateIgnitionConfig() error {
147
// local means the same as the host
148
// look up where it is pointing to on the host
149
if ign.TimeZone == "local" {
150
- tz, err = getLocalTimeZone()
151
- if err != nil {
152
- return fmt.Errorf("error getting local timezone: %q", err)
+ if env, ok := os.LookupEnv("TZ"); ok {
+ tz = env
+ } else {
153
+ tz, err = getLocalTimeZone()
154
+ if err != nil {
155
+ return fmt.Errorf("error getting local timezone: %q", err)
156
+ }
157
}
158
159
// getLocalTimeZone() can return empty string, do not add broken symlink in that case
0 commit comments