std

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	January    = time.January
	February   = time.February
	Monday     = time.Monday
	Second     = time.Second
	Nanosecond = time.Nanosecond
)

重导出 time 包的常量

Variables

View Source
var (
	UTC   = time.UTC
	Local = time.Local
)

重导出 time 包的变量

View Source
var (
	Now   = time.Now
	Since = time.Since
	Until = time.Until
	Date  = time.Date
	//Parse         = time.Parse
	Sleep         = time.Sleep
	NewTicker     = time.NewTicker
	NewTimer      = time.NewTimer
	After         = time.After
	AfterFunc     = time.AfterFunc
	Tick          = time.Tick
	ParseDuration = time.ParseDuration
)

重导出 time 包的函数

View Source
var GetTimeZone = func() *time.Location {

	fmt.Println("获取自定义时区,调整该函数")

	return time.UTC
}

Functions

This section is empty.

Types

type Duration

type Duration = time.Duration

type Location

type Location = time.Location

type Month

type Month = time.Month

type Ticker

type Ticker = time.Ticker

type Time

type Time = time.Time

func New

func New(year, month, day, hour, minute, second int) Time

func NowPtr

func NowPtr() *Time

func Parse

func Parse(str string) (Time, error)

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (*Time) Scan

func (t *Time) Scan(value interface{}) error

func (Time) String

func (t Time) String() string

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

func (Time) Value

func (t Time) Value() (driver.Value, error)

type Timer

type Timer = time.Timer

type Weekday

type Weekday = time.Weekday

Jump to

Keyboard shortcuts

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