Standard library / time

time.UnixMicro()

Construct a local-location Time from microseconds since the Unix epoch. Expected stdout: '1969-12-31T23:59:59.999999Z\n'.

Formal Syntax & Structure

go syntaxgo
func UnixMicro(usec int64) Time

Parameters & Attributes

NameTypeDescription
usecint64Microseconds since Unix epoch.

Return Value

Time

Construct a local-location Time from microseconds since the Unix epoch.

Working Example

Example Snippetgo
package main
import (  "fmt"  "time")
func main() { fmt.Println(time.UnixMicro(-1).UTC().Format(time.RFC3339Nano)) }
Go Reference