From: Kim Soo <popododo0720@naver.com>
To: pbs-devel@lists.proxmox.com
Cc: Kim Soo <popododo0720@naver.com>
Subject: [PATCH proxmox-backup] fix #8109: catalog: dump: print file mtime in UTC
Date: Wed, 18 Nov 2026 14:40:52 +0900 [thread overview]
Message-ID: <20261118054052.1497779-1-popododo0720@naver.com> (raw)
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.
Use epoch_to_rfc3339_utc() 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>
---
Tested with a file with mtime 2026-01-01T00:00:00Z:
before:
TZ=Asia/Seoul -> 2026-01-01T09:00:00Z
TZ=UTC -> 2026-01-01T00:00:00Z
after:
TZ=Asia/Seoul -> 2026-01-01T00:00:00Z
TZ=UTC -> 2026-01-01T00:00:00Z
TZ=America/New_York -> 2026-01-01T00:00:00Z
pbs-datastore/src/catalog.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
next 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 Kim Soo [this message]
2026-11-18 6:06 ` [PATCH proxmox-backup v2] fix #8109: catalog: dump: print file mtime in UTC Kim Soo
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=20261118054052.1497779-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.