Validating timestamps in record
[?]
Apr 29, 2021, 4:33 PM
NS36CJCO6E2FS65JRHHMOK4GTL7CLNOOLQZZAAAIZI2CQYNPAYRQCDependencies
- [2]
4H2XTVJ2Fix some mistakes in the docs - [3]
KWAMD2KRA few fixes in the documentation comments - [4]
AEPEFS7OWrite help for each argument - [5]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- replacement in pijul/src/commands/record.rs at line 39
#[clap(long = "timestamp")]#[clap(long = "timestamp", validator = timestamp_validator)] - edit in pijul/src/commands/record.rs at line 57
fn timestamp_validator(s: &str) -> Result<(), &'static str> {if let Ok(t) = s.parse() {if chrono::NaiveDateTime::from_timestamp_opt(t, 0).is_some() {return Ok(())}}Err("Could not parse timestamp")}