aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/GpgGenKeyInfo.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2021-12-07 08:37:54 +0000
committerGitHub <[email protected]>2021-12-07 08:37:54 +0000
commitcc89ad54ab3dd4aeb3ed7afeed59a80b6e61649c (patch)
tree865d2298d836c8eb36584b5d268325bca4a66a78 /src/gpg/GpgGenKeyInfo.cpp
parentMerge pull request #26 from saturneric/develop (diff)
parentFix Bugs on KeyUploadDialog (diff)
downloadGpgFrontend-cc89ad54ab3dd4aeb3ed7afeed59a80b6e61649c.tar.gz
GpgFrontend-cc89ad54ab3dd4aeb3ed7afeed59a80b6e61649c.zip
Merge pull request #28 from saturneric/develop
Diffstat (limited to 'src/gpg/GpgGenKeyInfo.cpp')
-rw-r--r--src/gpg/GpgGenKeyInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpg/GpgGenKeyInfo.cpp b/src/gpg/GpgGenKeyInfo.cpp
index 07708433..4a0a99fc 100644
--- a/src/gpg/GpgGenKeyInfo.cpp
+++ b/src/gpg/GpgGenKeyInfo.cpp
@@ -147,9 +147,9 @@ void GpgFrontend::GenKeyInfo::setKeySize(int m_key_size) {
}
void GpgFrontend::GenKeyInfo::setExpired(
- const boost::gregorian::date &m_expired) {
+ const boost::posix_time::ptime &m_expired) {
using namespace boost::gregorian;
- auto current = day_clock::local_day();
+ auto current = boost::posix_time::second_clock::local_time();
if (isNonExpired() && m_expired < current + years(2)) {
GenKeyInfo::expired = m_expired;
}
@@ -157,7 +157,7 @@ void GpgFrontend::GenKeyInfo::setExpired(
void GpgFrontend::GenKeyInfo::setNonExpired(bool m_non_expired) {
using namespace boost::posix_time;
- if (!m_non_expired) this->expired = from_time_t(0).date();
+ if (!m_non_expired) this->expired = from_time_t(0);
GenKeyInfo::nonExpired = m_non_expired;
}