diff options
-rw-r--r-- | core/qthelper.cpp | 9 | ||||
-rw-r--r-- | core/qthelper.h | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 1ae788966..656640755 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -624,7 +624,7 @@ QString get_pressure_string(pressure_t pressure, bool showunit) QString get_salinity_string(int salinity) { - return QStringLiteral("%L1%2").arg(salinity / 10.0).arg(gettextFromC::tr("g/ℓ")); + return QStringLiteral("%L1%2").arg(salinity / 10.0).arg(gettextFromC::tr("g/ℓ")); } QString get_water_type_string(int salinity) @@ -690,13 +690,10 @@ QString getPrintingTemplatePathBundle() return path; } -int gettimezoneoffset(timestamp_t when) +int gettimezoneoffset() { QDateTime dt1, dt2; - if (when == 0) - dt1 = QDateTime::currentDateTime(); - else - dt1 = timestampToDateTime(when); + dt1 = QDateTime::currentDateTime(); dt2 = dt1.toUTC(); dt1.setTimeSpec(Qt::UTC); return dt2.secsTo(dt1); diff --git a/core/qthelper.h b/core/qthelper.h index 1367a5007..a18d6d04d 100644 --- a/core/qthelper.h +++ b/core/qthelper.h @@ -61,7 +61,7 @@ QString get_water_type_string(int salinity); QString getSubsurfaceDataPath(QString folderToFind); QString getPrintingTemplatePathUser(); QString getPrintingTemplatePathBundle(); -int gettimezoneoffset(timestamp_t when = 0); +int gettimezoneoffset(); QDateTime timestampToDateTime(timestamp_t when); timestamp_t dateTimeToTimestamp(const QDateTime &t); int parseDurationToSeconds(const QString &text); |