From: Kim Soo <popododo0720@naver.com>
To: pbs-devel@lists.proxmox.com
Cc: Kim Soo <popododo0720@naver.com>
Subject: [PATCH proxmox-backup v2] fix #8109: catalog: dump: print file mtime in UTC
Date: Wed, 18 Nov 2026 15:06:58 +0900 [thread overview]
Message-ID: <20261118060658.1515616-1-popododo0720@naver.com> (raw)
In-Reply-To: <20261118054052.1497779-1-popododo0720@naver.com>
The catalog dump formatted the file mtime with strftime_local() but
appended a literal 'Z', so the printed time was off by the local UTC
offset while claiming to be UTC. Depending on the offset the date was
wrong as well.
This affects both code paths of the dump: the regular catalog, and the
fallback for snapshots created with change detection mode 'metadata',
which have no catalog and are dumped from the metadata archives.
Use epoch_to_rfc3339_utc() in both places instead, which is also used
for snapshot names, so the output is actually UTC and consistent with
them.
Signed-off-by: Kim Soo <popododo0720@naver.com>
---
Changes v1 -> v2:
* also fix the fallback path for snapshots without a catalog
(change detection mode 'metadata') in pbs-client
Tested with a file with mtime 2026-01-01T00:00:00Z, dumping a snapshot
with a catalog (default mode) and one created with
--change-detection-mode metadata:
before after
default, Seoul 2026-01-01T09:00:00Z 2026-01-01T00:00:00Z
default, UTC 2026-01-01T00:00:00Z 2026-01-01T00:00:00Z
default, New_York 2025-12-31T19:00:00Z 2026-01-01T00:00:00Z
metadata, Seoul 2026-01-01T09:00:00Z 2026-01-01T00:00:00Z
metadata, UTC 2026-01-01T00:00:00Z 2026-01-01T00:00:00Z
metadata, New_York 2025-12-31T19:00:00Z 2026-01-01T00:00:00Z
pbs-client/src/pxar/tools.rs | 2 +-
pbs-datastore/src/catalog.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pbs-client/src/pxar/tools.rs b/pbs-client/src/pxar/tools.rs
index 0c8c2927e..2c62f6230 100644
--- a/pbs-client/src/pxar/tools.rs
+++ b/pbs-client/src/pxar/tools.rs
@@ -432,7 +432,7 @@ pub async fn pxar_metadata_catalog_dump_dir<T: Clone + Send + Sync + ReadAt>(
match attr {
DirEntryAttribute::File { size, mtime } => {
let mut mtime_string = mtime.to_string();
- if let Ok(s) = proxmox_time::strftime_local("%FT%TZ", mtime) {
+ if let Ok(s) = proxmox_time::epoch_to_rfc3339_utc(mtime) {
mtime_string = s;
}
info!("{etype} {entry_path:?} {size} {mtime_string}");
diff --git a/pbs-datastore/src/catalog.rs b/pbs-datastore/src/catalog.rs
index a2e79dea8..9f2fca881 100644
--- a/pbs-datastore/src/catalog.rs
+++ b/pbs-datastore/src/catalog.rs
@@ -745,7 +745,7 @@ impl<R: Read + Seek> CatalogReader<R> {
}
CatalogEntryType::File => {
let mut mtime_string = mtime.to_string();
- if let Ok(s) = proxmox_time::strftime_local("%FT%TZ", mtime) {
+ if let Ok(s) = proxmox_time::epoch_to_rfc3339_utc(mtime) {
mtime_string = s;
}
--
2.55.0
prev parent reply other threads:[~2026-11-20 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 5:40 [PATCH proxmox-backup] fix #8109: catalog: dump: print file mtime in UTC Kim Soo
2026-11-18 6:06 ` Kim Soo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261118060658.1515616-1-popododo0720@naver.com \
--to=popododo0720@naver.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox