jsontime

package
v0.0.0-...-a0a3655 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package jsontime implements a JSON-serializable container for a time.Time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Time

type Time struct {
	time.Time
}

Time is a wrapper around a time.Time that can be marshalled to/from JSON.

Time will always unmarshal to UTC, regardless of the input Time's Location.

func (Time) MarshalJSON

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

MarshalJSON implements json.Marshaler.

func (*Time) UnmarshalJSON

func (jt *Time) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

Jump to

Keyboard shortcuts

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