encodedTime

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Unix

type Unix time.Time

Unix converts unix times to time.Time

func NewUnix

func NewUnix(secs int64) Unix

NewUnix returns a Unix instance with secs since unix-0

func (Unix) MarshalJSON

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

MarshalJSON takes the Unix() seconds from the time and uses strconv.FormatInt() to return the string of digits

func (*Unix) UnmarshalJSON

func (t *Unix) UnmarshalJSON(in []byte) (err error)

UnmarshalJSON for Unix converts the []byte value to int64 seconds and than constructs the time with time.Unix()

Jump to

Keyboard shortcuts

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