Fix rust binary builds

This commit is contained in:
Akemi Izuko 2023-12-23 20:14:21 -07:00
parent 1482b1c614
commit c503ab76c5
Signed by: akemi
GPG key ID: 8DE0764E1809E9FC
2 changed files with 4 additions and 4 deletions

View file

@ -22,9 +22,9 @@ path = "src/rename_for_unix.rs"
name = "random_password" name = "random_password"
path = "src/random_password.rs" path = "src/random_password.rs"
[[bin]] #[[bin]]
name = "prettify_markdown_notes" #name = "prettify_markdown_notes"
path = "src/prettify_markdown_notes.rs" #path = "src/prettify_markdown_notes.rs"
[dependencies] [dependencies]
chrono = "0.4.23" chrono = "0.4.23"

View file

@ -43,7 +43,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
for line in lines { for line in lines {
if timestamp.is_match(&line) { if timestamp.is_match(&line) {
let unix_utc: i64 = line[1..].parse()?; let unix_utc: i64 = line[1..].parse()?;
let time = NaiveDateTime::from_timestamp_opt(millis, 0).unwrap(); let time = NaiveDateTime::from_timestamp_opt(unix_utc, 0).unwrap();
let local_time = Local.from_utc_datetime(&time); let local_time = Local.from_utc_datetime(&time);
let fmttime = local_time.format("%a %b %e %T %Y").to_string(); let fmttime = local_time.format("%a %b %e %T %Y").to_string();