QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
QDateTime as_utc(const QDateTime &old_dt)
Returns copy of QDateTime with TimeSpec set to UTC.
@ kScreenShotFilename
"yyyy-MM-ddThh-mm-ss.zzz"
@ kOverrideUTC
Present date/time in UTC.
QString formatTime(std::chrono::milliseconds msecs, QString fmt)
Format a milliseconds time value.
@ kDateTimeShort
Default local time.
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
std::chrono::seconds secsInFuture(const QDateTime &future)
MBASE_PUBLIC QDateTime fromSecsSinceEpoch(int64_t seconds)
This function takes the number of seconds since the start of the epoch and returns a QDateTime with t...
@ kFilename
Default UTC, "yyyyMMddhhmmss".
@ kDateEither
Default local time.
@ kOverrideLocal
Present date/time in localtime.
@ kAutoYear
Add year only if different from current year.
@ kDateShort
Default local time.
int ternary_compare(const QDateTime &a, const QDateTime &b)
balanced ternary (three way) comparison This is equivalent to C++20's operator <=>.
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
std::chrono::milliseconds currentMSecsSinceEpochAsDuration(void)
std::chrono::seconds secsInPast(const QDateTime &past)
@ kAddYear
Add year to string if not included.
@ kRFC822
HTTP Date format.
QString current_iso_string(bool stripped)
Returns current Date and Time in UTC as a string.
@ kDatabase
Default UTC, database format.
@ kDateFull
Default local time.
std::chrono::seconds toSeconds(QTime time)
Returns the total number of seconds since midnight of the supplied QTime.
@ kDateTimeFull
Default local time.
@ kTime
Default local time.