xtime

package
v1.21.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateFormatTimestamp = "2006-01-02 15:04:05.000000"
	DateFormatLine      = "2006/01/02 15:04:05"
	DateFormatLineV2    = "2006-01-02 15:04:05"
	DateFormatLineV3    = "2006-01-02"
	DateYmdNoLine       = "20060102"
	DateymdNoLine       = "060102"
	DateYmdNoLineV2     = "20060102150405"
	DateYmdNoLineV3     = "200601"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Time

type Time time.Time

func (Time) MarshalJSON

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

func (*Time) Scan

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

Scan 实现 sql.Scanner 接口,处理从数据库里拿出的值

func (Time) String

func (t Time) String() string

func (Time) Time

func (t Time) Time() time.Time

Time get time.

func (*Time) UnmarshalJSON

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

func (Time) Value

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

Value 实现 driver.Valuer 接口,处理将要写入数据库的值

Jump to

Keyboard shortcuts

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