Standard library / time

time.Location.String()

Return the descriptive location name, not necessarily its current zone abbreviation or offset. Expected stdout: 'Office\n'.

Formal Syntax & Structure

go syntaxgo
func (l *Location) String() string

Return Value

string

Return the descriptive location name, not necessarily its current zone abbreviation or offset.

Working Example

Example Snippetgo
package main
import (  "fmt"  "time")
func main() { fmt.Println(time.FixedZone("Office", 7200).String()) }
Go Reference