all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup] fix #8109: catalog: dump: print file mtime in UTC
@ 2026-11-18  5:40 Kim Soo
  2026-11-18  6:06 ` [PATCH proxmox-backup v2] " Kim Soo
  0 siblings, 1 reply; 2+ messages in thread
From: Kim Soo @ 2026-11-18  5:40 UTC (permalink / raw)
  To: pbs-devel; +Cc: Kim Soo

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-20 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18  5:40 [PATCH proxmox-backup] fix #8109: catalog: dump: print file mtime in UTC Kim Soo
2026-11-18  6:06 ` [PATCH proxmox-backup v2] " Kim Soo

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal