diff --git a/lang/qt/src/qgpgmequickjob.cpp b/lang/qt/src/qgpgmequickjob.cpp index 13ec0a9f..93027d94 100644 --- a/lang/qt/src/qgpgmequickjob.cpp +++ b/lang/qt/src/qgpgmequickjob.cpp @@ -59,7 +59,7 @@ static QGpgMEQuickJob::result_type createWorker(GpgME::Context *ctx, auto err = ctx->createKey(uid.toUtf8().constData(), algo, 0, - expires.isValid() ? (unsigned long) expires.toSecsSinceEpoch() : 0, + expires.isValid() ? (unsigned long) (expires.toMSecsSinceEpoch() / 1000) : 0, key, flags); return std::make_tuple(err, QString(), Error()); @@ -72,7 +72,7 @@ static QGpgMEQuickJob::result_type addSubkeyWorker(GpgME::Context *ctx, unsigned int flags) { auto err = ctx->createSubkey(key, algo, 0, - expires.isValid() ? (unsigned long) expires.toSecsSinceEpoch() : 0, + expires.isValid() ? (unsigned long) (expires.toMSecsSinceEpoch() / 1000): 0, flags); return std::make_tuple(err, QString(), Error()); }