Struct ion_c_sys::_ion_timestamp [−][src]
#[repr(C)]pub struct _ion_timestamp { pub precision: u8, pub tz_offset: i16, pub year: u16, pub month: u16, pub day: u16, pub hours: u16, pub minutes: u16, pub seconds: u16, pub fraction: decQuad, }
Expand description
Structure to store time information. time_t only has up to second precision, and time zone support is OS dependent. _ion_timestamp uses decimal to store fraction of a second
Fields
precision: u8
Defined as ION_TS_YEAR, ION_TS_MONTH, ION_TS_DAY, ION_TS_MIN, ION_TS_SEC, ION_TS_FRAC
tz_offset: i16
Time zone offset (+/- 24 hours), in term of minutes.
year: u16
month: u16
day: u16
hours: u16
minutes: u16
seconds: u16
fraction: decQuad
Fraction of a second, e.g: 0.5, 0.01, etc
Implementations
Converts the given IonDateTime
into this ION_TIMESTAMP
.
Converts this ION_TIMESTAMP
into a IonDateTime
.
Note that this borrows mutably, because all of the underlying
ion_timestamp_*
functions require a mutable pointer, but this operation
does not actually change the value.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for _ion_timestamp
impl Send for _ion_timestamp
impl Sync for _ion_timestamp
impl Unpin for _ion_timestamp
impl UnwindSafe for _ion_timestamp
Blanket Implementations
Mutably borrows from an owned value. Read more