timestamp

package
v0.0.0-...-56c67ce Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Format = "2006/01/02 15:04:05.999 MST"
)

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 (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) 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

Jump to

Keyboard shortcuts

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