pyre.schemata.Timestamp

Module Contents

class pyre.schemata.Timestamp.Timestamp(default=datetime.datetime.today(), format=format, **kwds)

Bases: pyre.schemata.Schema.Schema

A type declarator for timestamps

format = %Y-%m-%d %H:%M:%S
typename = timestamp
complaint = could not coerce {0.value!r} into a time
coerce(self, value, **kwds)

Attempt to convert {value} into a timestamp

string(self, value)

Render value as a string that can be persisted for later coercion

json(self, value)

Generate a JSON representation of {value}