Skip to content

proposal: time: Add function to generate a Location struct #20629

@FlorianUekermann

Description

@FlorianUekermann

If I am not mistaken it is currently not possible (without using unsafe) to generate a time.Location. This is a bit of a problem because whether LoadLocation works is quite pretty platform/instance dependent. A simple solution could be to add:
func NewLocation(name string, zone []Zone, tx []ZoneTrans) *Location
which would require making Zone(Trans)? and theyr fields public.

I guess Zone and ZoneTrans could also go into a subpackage to avoid cluttering the documentation of the time package.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions