localtime

package module
v0.0.0-...-994d3a9 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README

localtime

gorm time & datetime

Documentation

Index

Constants

View Source
const DateFormat = "2006-01-02"
View Source
const DateTimeFormat = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalDate

type LocalDate struct {
	time.Time
}

LocalDate 本地日期

func (LocalDate) MarshalJSON

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

MarshalJSON LocalDate 序列号

func (*LocalDate) Scan

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

Scan Gorm 扫描时的数据赋值

func (*LocalDate) UnmarshalJSON

func (t *LocalDate) UnmarshalJSON(bytes []byte) (err error)

func (LocalDate) Value

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

Value LocalDate 转 time

type LocalTime

type LocalTime struct {
	time.Time
}

LocalTime 本地时间

func (LocalTime) MarshalJSON

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

MarshalJSON gorm marshal 序列化结构体

func (*LocalTime) Scan

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

Scan gorm Scan 扫描时的数据赋值

func (*LocalTime) UnmarshalJSON

func (t *LocalTime) UnmarshalJSON(bytes []byte) (err error)

UnmarshalJSON gin bind 反射结构体

func (LocalTime) Value

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

Value LocalTime 转 time

Jump to

Keyboard shortcuts

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