diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-03-23 05:53:51 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-03-23 05:53:51 +0000 |
commit | f44770ab64d465c099ca893a0536e467052f9d3b (patch) | |
tree | e45cfffc298033cc34c8b9d7bed894e4696c55f8 /src/backup_run.rs | |
parent | 4a9b26903d48d622f7f2a01eb54eec88e92da868 (diff) | |
parent | d692b1877a18e83e23cfbcad1b5e9f91f561e7c1 (diff) | |
download | obnam2-f44770ab64d465c099ca893a0536e467052f9d3b.tar.gz |
Merge branch 'liw/trust-root' into 'main'
Add chunk that lists all generations
Closes #62 and #34
See merge request obnam/obnam!224
Diffstat (limited to 'src/backup_run.rs')
-rw-r--r-- | src/backup_run.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backup_run.rs b/src/backup_run.rs index b03a7ee..21140ba 100644 --- a/src/backup_run.rs +++ b/src/backup_run.rs @@ -356,7 +356,7 @@ impl<'a> BackupRun<'a> { info!("upload SQLite {}", filename.display()); let ids = self.upload_regular_file(filename, size).await?; let gen = GenerationChunk::new(ids); - let data = gen.to_data_chunk(¤t_timestamp())?; + let data = gen.to_data_chunk()?; let gen_id = self.client.upload_chunk(data).await?; info!("uploaded generation {}", gen_id); Ok(gen_id) @@ -406,7 +406,8 @@ impl<'a> BackupRun<'a> { } } -fn current_timestamp() -> String { +/// Current timestamp as an ISO 8601 string. +pub fn current_timestamp() -> String { let now: DateTime<Local> = Local::now(); format!("{}", now.format("%Y-%m-%d %H:%M:%S.%f %z")) } |