datetime

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const RFC3339UTC = "2006-01-02T15:04:05Z"

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date datatypes.Date

func (Date) MarshalJSON

func (date Date) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. The time is a quoted string in RFC 3339 format, with sub-second precision added if present.

func (Date) MarshalText

func (date Date) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface. The time is formatted in RFC 3339 format, with sub-second precision added if present.

func (*Date) UnmarshalJSON

func (date *Date) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format.

func (*Date) UnmarshalText

func (date *Date) UnmarshalText(data []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface. The time is expected to be in RFC 3339 format.

func (Date) Value

func (date Date) Value() (driver.Value, error)

type DateTimeUTC

type DateTimeUTC time.Time

func (DateTimeUTC) GormDBDataType

func (dt DateTimeUTC) GormDBDataType(db *gorm.DB, _ *schema.Field) string

func (DateTimeUTC) GormDataType

func (dt DateTimeUTC) GormDataType() string

GormDataType gorm common data type

func (DateTimeUTC) MarshalJSON

func (dt DateTimeUTC) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. The time is a quoted string in RFC 3339 format, with sub-second precision added if present.

func (DateTimeUTC) MarshalText

func (dt DateTimeUTC) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface. The time is formatted in RFC 3339 format, with sub-second precision added if present.

func (*DateTimeUTC) Scan

func (dt *DateTimeUTC) Scan(value interface{}) (err error)

func (*DateTimeUTC) UnmarshalJSON

func (dt *DateTimeUTC) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format.

func (*DateTimeUTC) UnmarshalText

func (dt *DateTimeUTC) UnmarshalText(data []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface. The time is expected to be in RFC 3339 format.

func (DateTimeUTC) Value

func (dt DateTimeUTC) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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