diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-07-10 10:16:37 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-07-10 10:16:37 +0200 |
commit | 6b9a1cc320a53e28fb1b9c99cb7897db797f253a (patch) | |
tree | 49717ce2e64ad4de2576e4717abcea67aa8e1ce8 /openpgp/src/literal.rs | |
parent | 4ba3f2845de226bb6dd675fea35cdb4ad1b538a9 (diff) |
openpgp: Use broken-down time in the literal data packet.
- Also, make the `date` argument in the LiteralWriter's constructor
optional, and explain what the parameters are for.
Diffstat (limited to 'openpgp/src/literal.rs')
-rw-r--r-- | openpgp/src/literal.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openpgp/src/literal.rs b/openpgp/src/literal.rs index 33464962..3b66d0c1 100644 --- a/openpgp/src/literal.rs +++ b/openpgp/src/literal.rs @@ -1,6 +1,8 @@ use std::fmt; use std::cmp; +use time; +use conversions::Time; use Literal; use Packet; @@ -42,7 +44,7 @@ impl Literal { common: Default::default(), format: format as u8, filename: None, - date: 0 + date: time::Tm::from_pgp(0), } } @@ -120,7 +122,7 @@ impl Literal { /// /// A Unix timestamp is the number of seconds since the Unix /// epoch. - pub fn date(mut self, timestamp: u32) -> Literal { + pub fn date(mut self, timestamp: time::Tm) -> Literal { self.date = timestamp; self } |