Struct cxx_qt_lib::QTimeZone

source ·
#[repr(C)]
pub struct QTimeZone { /* private fields */ }
Expand description

The QTimeZone class converts between UTC and local time in a specific time zone.

Implementations§

source§

impl QTimeZone

source

pub fn abbreviation(&self, atDateTime: &QDateTime) -> QString

Returns the time zone abbreviation at the given atDateTime. The abbreviation may change depending on DST or even historical events.

source§

impl QTimeZone

source

pub fn comment(&self) -> QString

Returns any comment for the time zone.

source§

impl QTimeZone

source

pub fn daylight_time_offset(&self, atDateTime: &QDateTime) -> i32

Returns the daylight-saving time offset at the given atDateTime, i.e. the number of seconds to add to the standard time offset to obtain the local daylight-saving time.

source§

impl QTimeZone

source

pub fn has_daylight_time(&self) -> bool

Returns true if the time zone has practiced daylight-saving at any time.

source§

impl QTimeZone

source

pub fn has_transitions(&self) -> bool

Returns true if the system backend supports obtaining transitions.

source§

impl QTimeZone

source

pub fn id(&self) -> QByteArray

Returns the IANA ID for the time zone.

source§

impl QTimeZone

source

pub fn is_daylight_time(&self, atDateTime: &QDateTime) -> bool

Returns true if daylight-saving was in effect at the given atDateTime.

source§

impl QTimeZone

source

pub fn is_valid(&self) -> bool

Returns true if this time zone is valid.

source§

impl QTimeZone

source

pub fn offset_from_utc(&self, atDateTime: &QDateTime) -> i32

Returns the total effective offset at the given atDateTime, i.e. the number of seconds to add to UTC to obtain the local time. This includes any DST offset that may be in effect, i.e. it is the sum of standardTimeOffset() and daylightTimeOffset() for the given datetime.

source§

impl QTimeZone

source

pub fn standard_time_offset(&self, atDateTime: &QDateTime) -> i32

Returns the standard time offset at the given atDateTime, i.e. the number of seconds to add to UTC to obtain the local Standard Time. This excludes any DST offset that may be in effect.

source§

impl QTimeZone

source

pub fn available_time_zone_ids() -> QList<QByteArray>

Returns a list of all available IANA time zone IDs on this system.

source

pub fn from_offset_seconds(offset_seconds: i32) -> UniquePtr<Self>

Creates an instance of a time zone with the requested Offset from UTC of offsetSeconds.

source

pub fn from_iana(iana_id: &QByteArray) -> UniquePtr<Self>

Creates an instance of the requested time zone ianaId.

source

pub fn new() -> UniquePtr<Self>

Create a null/invalid time zone instance.

source

pub fn system_time_zone() -> UniquePtr<Self>

Returns a QTimeZone object that refers to the local system time, as specified by systemTimeZoneId().

source

pub fn system_time_zone_id() -> QByteArray

Returns the current system time zone IANA ID.

source

pub fn to_owned(&self) -> UniquePtr<Self>

Copy constructor, create a copy of the QTimeZone.

source

pub fn utc() -> UniquePtr<Self>

Returns a QTimeZone object that refers to UTC (Universal Time Coordinated).

Trait Implementations§

source§

impl Debug for QTimeZone

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for QTimeZone

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ExternType for QTimeZone

§

type Kind = Opaque

§

type Id

A type-level representation of the type’s C++ namespace and type name. Read more
source§

impl PartialEq for QTimeZone

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for QTimeZone

source§

impl UniquePtrTarget for QTimeZone

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.