luci: Index | Files

package jsontime

import ""

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


Package Files


type Time Uses

type Time struct {

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 Uses

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

MarshalJSON implements json.Marshaler.

func (*Time) UnmarshalJSON Uses

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

UnmarshalJSON implements json.Unmarshaler.

Package jsontime imports 2 packages (graph) and is imported by 4 packages. Updated 2020-04-10. Refresh now. Tools for package owners.