gtime

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateTimeFormatter = "2006-01-02 15:04:05"
	DateFormatter     = "2006-01-02"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GTime

type GTime time.Time

GTime is alias type for time.Time

func New

func New(date string) (GTime, error)

func (GTime) MarshalJSON

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

MarshalJSON implements json marshal interface.

func (*GTime) Scan

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

Scan valueof time.Time 注意是指针类型 method

func (GTime) String

func (t GTime) String() string

func (*GTime) UnmarshalJSON

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

UnmarshalJSON implements json unmarshal interface.

func (GTime) Value

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

Value insert timestamp into mysql need this function

Jump to

Keyboard shortcuts

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