From 8f80129bac29227a03c35940af9d197ef0fa6398 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 22 May 2020 18:53:25 +0200 Subject: cleanup: create common QDateTime -> timestamp conversion function In analogy to the timestamp -> QDateTime conversion, create a common function. 1) For symmetry with the opposite conversion. 2) To remove numerous inconsistencies. 3) To remove use of the deprecated QDateTime::toTime_t() function. Signed-off-by: Berthold Stoeger --- core/qthelper.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/qthelper.h') diff --git a/core/qthelper.h b/core/qthelper.h index b0cab8b15..1367a5007 100644 --- a/core/qthelper.h +++ b/core/qthelper.h @@ -63,6 +63,7 @@ QString getPrintingTemplatePathUser(); QString getPrintingTemplatePathBundle(); int gettimezoneoffset(timestamp_t when = 0); QDateTime timestampToDateTime(timestamp_t when); +timestamp_t dateTimeToTimestamp(const QDateTime &t); int parseDurationToSeconds(const QString &text); int parseLengthToMm(const QString &text); int parseTemperatureToMkelvin(const QString &text); -- cgit v1.2.3-70-g09d2