pub struct UnixTime(pub i64);
Expand description
A 64 bit integer unix timestamp in seconds since the epoch in UTC.
Tuple Fields§
§0: i64
Implementations§
source§impl UnixTime
impl UnixTime
sourcepub fn datetime<T: TimeZone>(&self, timezone: &T) -> DateTime<T>
pub fn datetime<T: TimeZone>(&self, timezone: &T) -> DateTime<T>
Convert to a chrono::DateTime
object.
sourcepub fn dynamic_format<'a, T: TimeZone + 'a>(
&'a self,
timezone: &'a T,
info: &'a StepUnit
) -> DynamicFormatter<T>
pub fn dynamic_format<'a, T: TimeZone + 'a>(
&'a self,
timezone: &'a T,
info: &'a StepUnit
) -> DynamicFormatter<T>
Format a UnixTime with the given step unit specified. It will display that unit plus, the unit one above. So for example, if the step size is in hours, it will display the hour as well as the day of the week.
pub fn dynamic_where_format<'a, T: TimeZone + 'a>(
&'a self,
timezone: &'a T,
info: &'a StepUnit
) -> DynamicWhereFormatter<T>
👎Deprecated: We instead just print the unix time with all its resolution.
Trait Implementations§
source§impl HasDefaultTicks for UnixTime
impl HasDefaultTicks for UnixTime
type DefaultTicks = UnixTimeTickFmt<Utc>
fn default_ticks() -> Self::DefaultTicks
source§impl Ord for UnixTime
impl Ord for UnixTime
source§impl PartialOrd<UnixTime> for UnixTime
impl PartialOrd<UnixTime> for UnixTime
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T: TimeZone + Display> TickDistGen<UnixTime> for UnixTimeTickFmt<T>where
T::Offset: Display,
impl<T: TimeZone + Display> TickDistGen<UnixTime> for UnixTimeTickFmt<T>where
T::Offset: Display,
type Res = TickDistribution<Vec<UnixTime, Global>, UnixTimeFmt<T>>
fn generate(
self,
data: &DataBound<UnixTime>,
canvas: &RenderOptionsBound,
req: IndexRequester<'_>
) -> Self::Res
impl Copy for UnixTime
impl Eq for UnixTime
impl StructuralEq for UnixTime
impl StructuralPartialEq for UnixTime
Auto Trait Implementations§
impl RefUnwindSafe for UnixTime
impl Send for UnixTime
impl Sync for UnixTime
impl Unpin for UnixTime
impl UnwindSafe for UnixTime
Blanket Implementations§
source§impl<D> Elem for Dwhere
D: Display,
impl<D> Elem for Dwhere
D: Display,
type Tail = ()
fn render_head(self, w: &mut ElemWrite<'_>) -> Result<<D as Elem>::Tail, Error>
fn render_closure<K>(
self,
w: &mut ElemWrite<'_>,
func: impl FnOnce(&mut ElemWrite<'_>) -> Result<K, Error>
) -> Result<K, Error>where
Self: Sized,
source§fn chain<R>(self, other: R) -> Chain<Self, R>where
R: Elem,
Self: Sized,
fn chain<R>(self, other: R) -> Chain<Self, R>where
R: Elem,
Self: Sized,
Render all of Self and head of other, store tail of other.