Skip to content

time: time.Local is always UTC on iOS #20797

@gwik

Description

@gwik

Local timezone is hardcoded to UTC on iOS.

https://github.com/golang/go/blob/master/src/time/zoneinfo_ios.go#L39-L42

func initLocal() {
	// TODO(crawshaw): [NSTimeZone localTimeZone]
	localLoc = *UTC
}

As mentioned in the code it should use NSTimeZone localTimeZone to get the current timezone.

cc @eliasnaur @crawshaw

(Same issue on android #20455)

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.OS-iOSGOOS=iosmobileAndroid, iOS, and x/mobile

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions