Skip to content

time: add microseconds-based APIs #16087

@pmarks-net

Description

@pmarks-net

The upper bound of a nanoseconds-since-1970 timestamp is not very far away, on the timescale of human civilization:

time.Unix(0, math.MaxInt64)
2262-04-11 23:47:16.854775807 +0000 UTC

Suggestions for improvement:

  • Document the limits at https://golang.org/pkg/time/, and deprecate the UnixNano function.
  • Create a UnixMicro function, which works until the year 294247.

I notice a lot of code that tries to implement UnixMicro as UnixNano()/1000, so it would be good to have a centralized, correct implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Proposal

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions