Standard library / time

time.Location

Zone rules for translating instants into local time; may contain multiple offsets. Use UTC, FixedZone or LoadLocation. Expected stdout: '2\n'.

Formal Syntax & Structure

go syntaxgo
type Location struct { /* unexported fields */ }

Working Example

Example Snippetgo
package main
import (  "fmt"  "time")
func main() { loc := time.FixedZone("Plus2", 7200); fmt.Println(time.Unix(0, 0).In(loc).Hour()) }
Go Reference