unixtime

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UnixTime

type UnixTime int64

UnixTime is a type for a Unix Timestamp

func InSeconds

func InSeconds(s int64) UnixTime

InSeconds returns the UnixTime for the current time + the number of passed seconds

func New

func New(t time.Time) UnixTime

New creates a new UnixTime from a time.Time

func Now

func Now() UnixTime

Now returns the current time as UnixTime

func (*UnixTime) Scan

func (t *UnixTime) Scan(src interface{}) error

Scan implements the sql.Scanner interface

func (UnixTime) Time

func (t UnixTime) Time() time.Time

Time returns the UnixTime as time.Time

func (UnixTime) Value

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

Value implements the driver.Valuer interface

Jump to

Keyboard shortcuts

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