xztime

package
v0.0.0-...-3f5828c Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeLayout = "2006-01-02 15:04:05"

Functions

This section is empty.

Types

type Time

type Time struct {
	sysTime.Time
	// contains filtered or unexported fields
}

func Now

func Now() Time

当前时间

func Parse

func Parse(layout, value string) (time Time, err error)

根据字符解析时间

func (Time) MarshalJSON

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

在使用 json.Marshal 时触发

func (*Time) Scan

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

func (*Time) String

func (t *Time) String() string

fmt.Printf 触发

func (*Time) UnmarshalJSON

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

在使用 json.Unmarshal 时触发

func (Time) Value

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

Jump to

Keyboard shortcuts

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