Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtParseTimeZone::ParsedZone Class Reference

Describes a text fragment representing a timezone. More...

#include <qtparsetimezone_p.h>

Inheritance diagram for QtParseTimeZone::ParsedZone:
Collaboration diagram for QtParseTimeZone::ParsedZone:

Public Member Functions

constexpr QDateTime::TransitionResolution resolveType () const noexcept
Public Member Functions inherited from QtParseCommon::ParsedText
constexpr operator bool () const noexcept
constexpr bool isEmpty () const
constexpr qsizetype size () const
constexpr QStringView used (QStringView text) const

Public Attributes

QTimeZone zone {QTimeZone::LocalTime}
QDateTimePrivate::DaylightStatus timeType = QDateTimePrivate::UnknownDaylightTime
Public Attributes inherited from QtParseCommon::ParsedText
qsizetype startIndex = 0
qsizetype endIndex = 0

Detailed Description

Describes a text fragment representing a timezone.

Since
6.12

Returned by functions that parse a timezone representation from a text. Its member variables are: \list

  • zone A timezone representing the result of parsing
  • timeType A \l QDateTimePrivate::DaylightStatus indicating the form in which the zone is described by its representation
  • startIndex Parsed text offset of the start of the text matched
  • endIndex Parsed text offset of the end of the text matched

\endlist

The portion of the text that matched stretches from startIndex to endIndex and can be obtained by passing the same text to used(). This shall be empty if isEmpty() is true.

The zone describes the timezone matched. If isEmpty() is true, zone shall be a lightweight time representation for local time, since a timestamp with no specified zone is conventionally understood to be in local time (although whose local time may be unclear). If this leaves a tail of the text parsed that is otherwise not recognized, it may mean that the text was malformed, or represented a timezone not recognized by the parser. If the portion of the text matched takes a locale-appropriate form for a fixed offset from UTC, zone shall be a lightweight time representation for UTC, if the offset is zero, or for the specified offset from UTC. Otherwise, the text matched identified a specific timezone (this only happens if feature timezone is enabled) and zone is a timezone backed by system data.

Definition at line 30 of file qtparsetimezone_p.h.

Member Function Documentation

◆ resolveType()

QDateTime::TransitionResolution QtParseTimeZone::ParsedZone::resolveType ( ) const
inlineconstexprnoexcept

Definition at line 35 of file qtparsetimezone_p.h.

Member Data Documentation

◆ timeType

Definition at line 33 of file qtparsetimezone_p.h.

◆ zone

QTimeZone QtParseTimeZone::ParsedZone::zone {QTimeZone::LocalTime}

Definition at line 32 of file qtparsetimezone_p.h.


The documentation for this class was generated from the following file: