v1

package
v0.0.0-...-a0c03a0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 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 Time

type Time struct {
	// contains filtered or unexported fields
}

Time is based on time.Time.

FYI: OF's domain type in this case is literally "time.Time".

func NewTime

func NewTime(t time.Time) Time

NewTime returns a new instance of Time in UTC timezone.

func (Time) MarshalJSON

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

MarshalJSON implements the Marshaler interface in encoding/json. It leverages the String method of Time.

func (Time) String

func (t Time) String() string

String implements the fmt.Stringer interface.

String returns Time as a string in UTC timezone and RFC3339 format.

Jump to

Keyboard shortcuts

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