package
1.24.4
Repository: https://pkg.go.dev/std
Documentation: pkg.go.dev

# Packages

Package tzdata provides an embedded copy of the timezone database.

# Functions

After waits for the duration to elapse and then sends the current time on the returned channel.
AfterFunc waits for the duration to elapse and then calls f in its own goroutine.
Date returns the Time corresponding to yyyy-mm-dd hh:mm:ss + nsec nanoseconds in the appropriate zone for that time in the given location.
FixedZone returns a [Location] that always uses the given zone name and offset (seconds east of UTC).
LoadLocation returns the Location with the given name.
LoadLocationFromTZData returns a Location with the given name initialized from the IANA Time Zone database-formatted data.
NewTicker returns a new [Ticker] containing a channel that will send the current time on the channel after each tick.
NewTimer creates a new Timer that will send the current time on its channel after at least duration d.
Now returns the current local time.
Parse parses a formatted string and returns the time value it represents.
ParseDuration parses a duration string.
ParseInLocation is like Parse but differs in two important ways.
Since returns the time elapsed since t.
Sleep pauses the current goroutine for at least the duration d.
Tick is a convenience wrapper for [NewTicker] providing access to the ticking channel only.
Unix returns the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, 1970 UTC.
UnixMicro returns the local Time corresponding to the given Unix time, usec microseconds since January 1, 1970 UTC.
UnixMilli returns the local Time corresponding to the given Unix time, msec milliseconds since January 1, 1970 UTC.
Until returns the duration until t.

# Constants

These are predefined layouts for use in [Time.Format] and [time.Parse].
No description provided by the author
No description provided by the author
These are predefined layouts for use in [Time.Format] and [time.Parse].
These are predefined layouts for use in [Time.Format] and [time.Parse].
No description provided by the author
No description provided by the author
No description provided by the author
Common durations.
No description provided by the author
No description provided by the author
No description provided by the author
These are predefined layouts for use in [Time.Format] and [time.Parse].
The reference time, in numerical order.
No description provided by the author
No description provided by the author
Common durations.
Common durations.
Common durations.
No description provided by the author
Common durations.
No description provided by the author
No description provided by the author
These are predefined layouts for use in [Time.Format] and [time.Parse].
RFC1123 with numeric zone.
These are predefined layouts for use in [Time.Format] and [time.Parse].
These are predefined layouts for use in [Time.Format] and [time.Parse].
These are predefined layouts for use in [Time.Format] and [time.Parse].
RFC822 with numeric zone.
These are predefined layouts for use in [Time.Format] and [time.Parse].
These are predefined layouts for use in [Time.Format] and [time.Parse].
No description provided by the author
Common durations.
No description provided by the author
Handy time stamps.
These are predefined layouts for use in [Time.Format] and [time.Parse].
These are predefined layouts for use in [Time.Format] and [time.Parse].
These are predefined layouts for use in [Time.Format] and [time.Parse].
No description provided by the author
No description provided by the author
These are predefined layouts for use in [Time.Format] and [time.Parse].
No description provided by the author
These are predefined layouts for use in [Time.Format] and [time.Parse].
No description provided by the author

# Variables

Local represents the system's local time zone.
UTC represents Universal Coordinated Time (UTC).

# Structs

A Location maps time instants to the zone in use at that time.
ParseError describes a problem parsing a time string.
A Ticker holds a channel that delivers “ticks” of a clock at intervals.
A Time represents an instant in time with nanosecond precision.
The Timer type represents a single event.

# Type aliases

A Duration represents the elapsed time between two instants as an int64 nanosecond count.
A Month specifies a month of the year (January = 1, ...).
A Weekday specifies a day of the week (Sunday = 0, ...).