NeoVier / elm-eos / Eos.TimePointSec

TimePointSec encodes a point in time in seconds.


type TimePointSec

A point in time in seconds.

Converting to and from seconds

fromSeconds : Basics.Int -> TimePointSec

Convert seconds to a TimePointSec.

toSeconds : TimePointSec -> Basics.Int

Convert a TimePointSec to seconds.

Converting to and from Time.Posix

toPosix : TimePointSec -> Time.Posix

Convert a TimePointSec to a Time.Posix.

fromPosix : Time.Posix -> TimePointSec

Convert a Time.Posix to a TimePointSec.

Dealing with JSON

encode : TimePointSec -> Json.Encode.Value

Encode a TimePointSec into JSON. You can use this to send a TimePointSec to the blockchain or some server.

decoder : Json.Decode.Decoder TimePointSec

Decode a TimePointSec from JSON. You can use this to receive a TimePointSec from the blockchain or some server.