![]() The date and time can be changed with setDate() and setTime(). The choice of system used to represent a datetime is described as its "timespec".Ī QDateTime object is typically created either by giving a date and time explicitly in the constructor, or by using a static function such as currentDateTime() or fromMSecsSinceEpoch(). When using either local time or a specified time zone, time-zone transitions such as the starts and ends of daylight-saving time (DST but see below) are taken into account. ![]() In contrast, an offset from UTC of +3600 seconds is one hour ahead of UTC (usually written in ISO standard notation as "UTC+01:00"), with no daylight-saving offset or changes. For example, a time zone of "Europe/Berlin" will apply the daylight-saving rules as used in Germany since 1970. QDateTime can describe datetimes with respect to local time, to UTC, to a specified offset from UTC or to a specified time zone, in conjunction with the QTimeZone class. It provides functions for comparing datetimes and for manipulating a datetime by adding a number of seconds, days, months, or years. It can read the current datetime from the system clock. It combines features of the QDate and QTime classes. Operator>=(const QDateTime & other) constĪ QDateTime object encodes a calendar date and a clock time (a "datetime"). Operator!=(const QDateTime & other) const ![]() ToTimeZone(const QTimeZone & timeZone) const ToString(QStringView format, QCalendar cal) const ToString(const QString & format, QCalendar cal) const ToString(Qt::DateFormat format = Qt::TextDate) const QDateTime(const QDate & date, const QTime & time, Qt::TimeSpec spec = Qt::LocalTime) QDateTime(const QDate & date, const QTime & time, Qt::TimeSpec spec, int offsetSeconds) QDateTime(const QDate & date, const QTime & time, const QTimeZone & timeZone)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |