pub struct TimestampTz {
pub offset: i8,
pub value: i64,
}Expand description
Represents a timestamp with timezone information.
Combines a timestamp value with a timezone offset, allowing for timezone-aware datetime operations. The timestamp is stored in UTC, and the offset indicates the local timezone. Standard JSON has no native timezone-aware timestamp type.
Fields§
§offset: i8Timezone offset in hours from UTC
value: i64Microseconds since Unix epoch (January 1, 1970 00:00:00 UTC)
Trait Implementations§
Source§impl Clone for TimestampTz
impl Clone for TimestampTz
Source§fn clone(&self) -> TimestampTz
fn clone(&self) -> TimestampTz
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimestampTz
impl Debug for TimestampTz
Source§impl Display for TimestampTz
impl Display for TimestampTz
Source§impl Ord for TimestampTz
impl Ord for TimestampTz
Source§fn cmp(&self, other: &TimestampTz) -> Ordering
fn cmp(&self, other: &TimestampTz) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TimestampTz
impl PartialEq for TimestampTz
Source§impl PartialOrd for TimestampTz
impl PartialOrd for TimestampTz
impl Eq for TimestampTz
impl StructuralPartialEq for TimestampTz
Auto Trait Implementations§
impl Freeze for TimestampTz
impl RefUnwindSafe for TimestampTz
impl Send for TimestampTz
impl Sync for TimestampTz
impl Unpin for TimestampTz
impl UnwindSafe for TimestampTz
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.