diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-11-20 19:02:34 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-11-21 16:25:30 +0100 |
commit | b251f9e8857fba284f515061ac62013519997e30 (patch) | |
tree | 8cb3501b8cb32e43496e56dd76446ba7559c7eed /openpgp/src/serialize/stream.rs | |
parent | 13c437470cc7377d7b761b5bb9b8d4efb0ba385e (diff) |
openpgp: Replace time crate with std::time.
- In sq and sqv, use chrono to interface with the user.
- Fixes #341.
Diffstat (limited to 'openpgp/src/serialize/stream.rs')
-rw-r--r-- | openpgp/src/serialize/stream.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs index 22f7e44c..4b1e0d88 100644 --- a/openpgp/src/serialize/stream.rs +++ b/openpgp/src/serialize/stream.rs @@ -11,7 +11,7 @@ use std::fmt; use std::io::{self, Write}; -use time; +use std::time; use crate::{ crypto, @@ -419,7 +419,8 @@ impl<'a> Signer<'a> { // Make and hash a signature packet. let mut sig = signature::Builder::new(SignatureType::Binary) - .set_signature_creation_time(time::now().canonicalize())? + .set_signature_creation_time( + std::time::SystemTime::now().canonicalize())? .set_issuer_fingerprint(signer.public().fingerprint())? // GnuPG up to (and including) 2.2.8 requires the // Issuer subpacket to be present. @@ -583,7 +584,7 @@ impl<'a> LiteralWriter<'a> { } /// Sets the data format. - pub fn date(mut self, timestamp: time::Tm) -> Result<Self> + pub fn date(mut self, timestamp: time::SystemTime) -> Result<Self> { self.template.set_date(Some(timestamp)); Ok(self) |