timestamp

package
v0.0.0-...-5e10106 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Format = time.RFC3339Nano
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Timestamp

type Timestamp uint64

Timestamp is in milliseconds

func FromTime

func FromTime(t time.Time) Timestamp

func Now

func Now() Timestamp

func Parse

func Parse(layout, value string) (Timestamp, error)

func Unix

func Unix(sec, nsec int64) Timestamp

func UnixMilli

func UnixMilli(msec int64) Timestamp

func (Timestamp) Add

func (t Timestamp) Add(d time.Duration) Timestamp

func (Timestamp) After

func (t Timestamp) After(t2 Timestamp) bool

func (Timestamp) Before

func (t Timestamp) Before(t2 Timestamp) bool

func (Timestamp) Equal

func (t Timestamp) Equal(t2 Timestamp) bool

func (Timestamp) EqualToTime

func (t Timestamp) EqualToTime(t2 time.Time) bool

func (Timestamp) IsZero

func (t Timestamp) IsZero() bool

func (Timestamp) MarshalJSON

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

func (Timestamp) MarshalText

func (t Timestamp) MarshalText() (text []byte, err error)

func (Timestamp) Nanosecond

func (t Timestamp) Nanosecond() int

func (Timestamp) String

func (t Timestamp) String() string

func (Timestamp) ToTime

func (t Timestamp) ToTime() time.Time

func (Timestamp) Unix

func (t Timestamp) Unix() int64

func (Timestamp) UnixMilli

func (t Timestamp) UnixMilli() int64

func (*Timestamp) UnmarshalJSON

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

func (*Timestamp) UnmarshalText

func (t *Timestamp) UnmarshalText(data []byte) error

Jump to

Keyboard shortcuts

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