#[repr(C)]pub struct UdfTimestamp {
pub type_and_tz: u16,
pub year: u16,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub centiseconds: u8,
pub hundreds_of_microseconds: u8,
pub microseconds: u8,
}Expand description
UDF timestamp structure
Represents date and time in UDF format (ECMA-167 1/7.3)
Fields§
§type_and_tz: u16Type and timezone Bits 0-11: Timezone offset in minutes from UTC (-1440 to 1440) Bits 12-15: Type (0=UTC, 1=local, 2=agreement)
year: u16Year (1-9999)
month: u8Month (1-12)
day: u8Day (1-31)
hour: u8Hour (0-23)
minute: u8Minute (0-59)
second: u8Second (0-59)
centiseconds: u8Centiseconds (0-99)
hundreds_of_microseconds: u8Hundreds of microseconds (0-99)
microseconds: u8Microseconds (0-99)
Implementations§
Source§impl UdfTimestamp
impl UdfTimestamp
Sourcepub fn timezone_type(&self) -> TimezoneType
pub fn timezone_type(&self) -> TimezoneType
Get the timezone type
Sourcepub fn timezone_offset(&self) -> Option<i16>
pub fn timezone_offset(&self) -> Option<i16>
Get the timezone offset in minutes from UTC
Returns None if the timezone is not specified
Source§impl UdfTimestamp
impl UdfTimestamp
Trait Implementations§
Source§impl Clone for UdfTimestamp
impl Clone for UdfTimestamp
Source§fn clone(&self) -> UdfTimestamp
fn clone(&self) -> UdfTimestamp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UdfTimestamp
Source§impl Debug for UdfTimestamp
impl Debug for UdfTimestamp
Source§impl Default for UdfTimestamp
impl Default for UdfTimestamp
Source§fn default() -> UdfTimestamp
fn default() -> UdfTimestamp
Returns the “default value” for a type. Read more
Source§impl Display for UdfTimestamp
impl Display for UdfTimestamp
impl Pod for UdfTimestamp
Auto Trait Implementations§
impl Freeze for UdfTimestamp
impl RefUnwindSafe for UdfTimestamp
impl Send for UdfTimestamp
impl Sync for UdfTimestamp
impl Unpin for UdfTimestamp
impl UnsafeUnpin for UdfTimestamp
impl UnwindSafe for UdfTimestamp
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.