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
impl QTimeZone
sourcepub fn abbreviation(&self, atDateTime: &QDateTime) -> QString
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
impl QTimeZone
sourcepub fn daylight_time_offset(&self, atDateTime: &QDateTime) -> i32
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
impl QTimeZone
sourcepub fn has_daylight_time(&self) -> bool
pub fn has_daylight_time(&self) -> bool
Returns true if the time zone has practiced daylight-saving at any time.
source§impl QTimeZone
impl QTimeZone
sourcepub fn has_transitions(&self) -> bool
pub fn has_transitions(&self) -> bool
Returns true if the system backend supports obtaining transitions.
source§impl QTimeZone
impl QTimeZone
sourcepub fn is_daylight_time(&self, atDateTime: &QDateTime) -> bool
pub fn is_daylight_time(&self, atDateTime: &QDateTime) -> bool
Returns true if daylight-saving was in effect at the given atDateTime.
source§impl QTimeZone
impl QTimeZone
sourcepub fn offset_from_utc(&self, atDateTime: &QDateTime) -> i32
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
impl QTimeZone
sourcepub fn standard_time_offset(&self, atDateTime: &QDateTime) -> i32
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
impl QTimeZone
sourcepub fn available_time_zone_ids() -> QList<QByteArray>
pub fn available_time_zone_ids() -> QList<QByteArray>
Returns a list of all available IANA time zone IDs on this system.
sourcepub fn from_offset_seconds(offset_seconds: i32) -> UniquePtr<Self>
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.
sourcepub fn from_iana(iana_id: &QByteArray) -> UniquePtr<Self>
pub fn from_iana(iana_id: &QByteArray) -> UniquePtr<Self>
Creates an instance of the requested time zone ianaId.
sourcepub fn system_time_zone() -> UniquePtr<Self>
pub fn system_time_zone() -> UniquePtr<Self>
Returns a QTimeZone object that refers to the local system time, as specified by systemTimeZoneId().
sourcepub fn system_time_zone_id() -> QByteArray
pub fn system_time_zone_id() -> QByteArray
Returns the current system time zone IANA ID.