#include <datetime.h>
Static Public Member Functions | |
static QDateTime | fromPathFriendlyUTCISO8601 (const QString &) |
static QString | toISO8601 (const QDateTime &) |
static QString | toPathFriendlyUTCISO8601 (const QDateTime &) |
Date and time utility class.
Definition at line 32 of file datetime.h.
|
static |
Parse the output of toPathFriendlyUTCISO8601() into a QDateTime.
Definition at line 36 of file datetime.cpp.
|
static |
Format QDateTime in the ISO 8601 format with the timezone offset.
Unlike the Qt's built-in QDateTime::toString(Qt::ISODate), this converter ensures that the timezone offset is in the returned string.
Definition at line 25 of file datetime.cpp.
|
static |
Format QDateTime in the almost-ISO 8601 format with UTC timezone.
Produce a formatted datetime that can be used as a path name.
:
.The output format is YYYY-MM-DDThhmmssZ
.
This is meant to produce a datetime that is readable, doesn't use characters that may collide with filesystem rules (:
is used to delimit $PATH
), sorts naturally in chronological order, and... pretends to be ISO 8601, while its not.
One could argue that the basic ISO 8601 format (YYYYMMDDThhmmssZ
) would be sufficient here, but that's not readable.
Definition at line 31 of file datetime.cpp.