![]() |
Home | ![]() |
The QMailTimeStamp class manages message time stamps. More...
#include <QMailTimeStamp>
enum | OutputFormat { Rfc2822, Rfc3501, Rfc3339 } |
QMailTimeStamp () | |
QMailTimeStamp ( const QString & timeText ) | |
QMailTimeStamp ( const QDateTime & dateTime ) | |
~QMailTimeStamp () | |
bool | isNull () const |
bool | isValid () const |
QDateTime | toLocalTime () const |
QString | toString ( OutputFormat format = Rfc2822 ) const |
QDateTime | toUTC () const |
bool | operator!= ( const QMailTimeStamp & other ) const |
bool | operator< ( const QMailTimeStamp & other ) const |
bool | operator<= ( const QMailTimeStamp & other ) const |
bool | operator== ( const QMailTimeStamp & other ) const |
bool | operator> ( const QMailTimeStamp & other ) const |
bool | operator>= ( const QMailTimeStamp & other ) const |
QMailTimeStamp | currentDateTime () |
The QMailTimeStamp class manages message time stamps.
QMailTimeStamp provides functions for creating and manipulating the time stamps of messages. QMailTimeStamp can be created from time stamp strings, or from QDateTime objects. The time stamp information can be extracted in UTC time, local time, or as a formatted string.
QMailTimeStamp maintains the timezone information of a time stamp, so it can be used to convert time stamp information between UTC time and localized time values.
See also QDateTime and QMailMessage.
This enum type is used to select a format for timestamp output.
Constant | Value | Description |
---|---|---|
QMailTimeStamp::Rfc2822 | 0 | The format used in SMTP message format; example: "Wed, 17 May 2006 20:45:00 +0100". |
QMailTimeStamp::Rfc3501 | 1 | The format used in IMAP message append; example: "17-May-2006 20:45:00 +0100". |
QMailTimeStamp::Rfc3339 | 2 | The format specified for future protocols (a variant of ISO 8601); example: "2006-05-17T20:45:00+01:00". |
Constructs a null QMailTimeStamp object. A null timestamp is invalid.
Constructs a QMailTimeStamp object by parsing timeText.
Constructs a QMailTimeStamp object from the given dateTime.
Destroys a QMailTimeStamp object.
Returns a QMailTimeStamp object initialised to contain the current date and time, in the local time zone.
Returns true if the timestamp has not been initialized to contain a value.
Returns true if the timestamp is valid; otherwise returns false;
Returns a QDateTime containing the time stamp converted to the local time zone.
Returns the time stamp information in the format specified by format.
Returns a QDateTime containing the time stamp in UTC time.
Returns true if this time stamp is different from other; otherwise returns false.
Two time stamps are different if either the date, the time, or the time zone components are different.
See also operator==().
Returns true if this time stamp is earlier than other; otherwise returns false.
Returns true if this time stamp is earlier than or equal to other; otherwise returns false.
Returns true if this time stamp is equal to other; otherwise returns false.
See also operator!=().
Returns true if this time stamp is later than other; otherwise returns false.
Returns true if this time stamp is later than or equal to other; otherwise returns false.
Copyright © 2010 QtSoftware | Messaging Framework |