Replace QDateTime::toTime_t() with QDateTime::toSecsSinceEpoch()

This commit is contained in:
Jonas Kvinge
2020-07-18 04:24:16 +02:00
parent dc7047e3c2
commit f1105393da
2 changed files with 5 additions and 5 deletions

View File

@@ -145,7 +145,7 @@ bool LocalRedirectServer::GenerateCertificate() {
gnutls_global_deinit();
return false;
}
quint64 time = QDateTime::currentDateTime().toTime_t();
quint64 time = QDateTime::currentDateTime().toSecsSinceEpoch();
gnutls_x509_crt_set_activation_time(crt, time);
if (int result = gnutls_x509_crt_set_expiration_time(crt, time + 31536000L) != GNUTLS_E_SUCCESS) {
error_ = QString("Failed to set the activation time of the certificate: %1").arg(gnutls_strerror(result));