Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GetLocalTimeCallStack = testutils.NewCallStack()
var GetTimeInZoneCallStack = testutils.NewCallStack()
var GetTimeLocationCallStack = testutils.NewCallStack()
Functions ¶
func GetLocation ¶
GetLocation returns the time.Location for the given time zone. The time zone should be a valid IANA time zone identifier, such as "America/New_York".
func GetTimeZone ¶
func GetTimeZone() string
GetTimeZone returns the local time zone identifier, in IANA format.
func Now ¶
Now returns the current local time. The time zone is determined in the following order of precedence: - If the X-Time-Zone header is present in the request, the time zone is set to the value of the header. - If the TZ environment variable is set on the host, the time zone is set to the value of the variable. - Otherwise, the time zone is set to the host's local time zone.
Types ¶
This section is empty.