Standard library / time

time.Local

System-local location; depends on environment and zoneinfo. Avoid changing it in concurrent application code; prefer explicit locations. Expected stdout: '1\n'.

Formal Syntax & Structure

go syntaxgo
var Local *Location

Working Example

Example Snippetgo
package main
import (  "fmt"  "time")
func main() {  time.Local = time.FixedZone("Fixture", 3600)  fmt.Println(time.Unix(0, 0).In(time.Local).Hour())}
Go Reference