Skip to main content

Timestamp

Type Alias Timestamp 

Source
pub type Timestamp = DateTime<Utc>;
Expand description

A point in time, stored as TIMESTAMPTZ (Postgres) or ISO-8601 text (SQLite).

Aliased Type§

pub struct Timestamp { /* private fields */ }

Trait Implementations§

Source§

impl Aggregable for Timestamp

Source§

impl Cast for Timestamp

RFC 3339 (2026-10-03T12:00:00Z), an HTML datetime-local value (2026-10-03T12:00, read as UTC), or a timestamp as Rust displays one (2026-10-03 12:00:00.25, with UTC or without).

Source§

fn cast(raw: &str) -> Result<Self, String>

Parses raw, or returns the error message for the field.
Source§

impl IntoField<NaiveDateTime> for Timestamp

Source§

impl IntoField<Option<NaiveDateTime>> for Timestamp

A time into a column without a zone, as Rails keeps them (in UTC).

Source§

impl Moment for Timestamp

Source§

impl Schema for Timestamp

Source§

impl ToValue for Timestamp

Source§

fn to_value(&self) -> Value

Source§

fn from_value(value: Value) -> Option<Self>

The field’s value from a column’s Value, the reverse of to_value: how a record is made from a changeset, for its callbacks. None when it doesn’t fit (the default, for types that can’t say).