timezone

package
v2.26.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UTC       = time.UTC
	PRC, _    = time.LoadLocation("Asia/Shanghai")
	Taipei, _ = time.LoadLocation("Asia/Taipei")
)

Functions

func FromContext added in v2.9.0

func FromContext(ctx context.Context) (*time.Location, bool)

func MustLoadLocation added in v2.11.0

func MustLoadLocation(name string) *time.Location

func NewContext added in v2.9.0

func NewContext(ctx context.Context, local *time.Location) context.Context

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider added in v2.11.0

func NewProvider(local *time.Location) *Provider

func (*Provider) Bootstrap added in v2.11.0

func (p *Provider) Bootstrap(ctx context.Context) (context.Context, error)

func (*Provider) Terminate added in v2.11.0

func (p *Provider) Terminate(ctx context.Context) (context.Context, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL