summaryrefslogtreecommitdiffstats
path: root/sq/src/commands/key.rs
diff options
context:
space:
mode:
Diffstat (limited to 'sq/src/commands/key.rs')
-rw-r--r--sq/src/commands/key.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/sq/src/commands/key.rs b/sq/src/commands/key.rs
index 23cae863..f597d6ac 100644
--- a/sq/src/commands/key.rs
+++ b/sq/src/commands/key.rs
@@ -50,6 +50,13 @@ fn generate(config: Config, m: &ArgMatches) -> Result<()> {
}
}
+ // Creation time.
+ if let Some(t) = m.value_of("creation-time") {
+ builder = builder.set_creation_time(SystemTime::from(
+ crate::parse_iso8601(t, chrono::NaiveTime::from_hms(0, 0, 0))
+ .context(format!("Parsing --creation-time {}", t))?));
+ };
+
// Expiration.
match (m.value_of("expires"), m.value_of("expires-in")) {
(None, None) => // Default expiration.