From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id DF0EA1FF0AF for ; Fri, 20 Nov 2026 14:58:16 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 26B2F21786; Fri, 20 Nov 2026 14:58:16 +0100 (CET) X-Originating-IP: 106.240.251.114 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=naver.com; s=s20171208; t=1794982021; bh=jkjOiPYmg+fFFaBhkkYZ+Z/Nu1RMXo0RKpGhxpbfW5U=; h=From:To:Subject:Date:Message-ID:From:Subject:Feedback-ID: X-Works-Security; b=MNyHeeACKrscvL+cclkI1xyYV3KinY0//1S0FdYZl1wWiHvXVyHegJMbgnbfFfpcB kXVnbzyvjXK9ElJj2E3Z7DFItmpckfoXHC7DvGvZW2w6278kBnGx1X99N3o0Vbhvtu tRA2zq69yRP+E9tv8e3KAF2BDLhFpV4XSwG98nx5Atyp7SHLW/7qAD4iNBJ9E3/5Lg un34LXeqq8u9jOdfE6K8K0B4E8FbokLzoo5S3tx3ERMZeYpttvse6JfCPcAYOohErN dvCjBXY+JoIujWBbXxoR4nHE0x0ZsQr4EkU8f8hQ+z4IjEufbwjKMoBXHXi5rTqx+v 2peLiJz5BoNoQ== X-Session-ID: O0rpSVjZR0OPWIIcscvsjg X-Originating-IP: 106.240.251.114 X-Works-Send-Opt: rPeTbzemjHmZFqITpzevKHmwjAJYKxtdFo2ZFqgmKNwkx0eFjAJYKg== X-Works-Smtp-Source: VqbdaxtlFqJZ+HmmKoMl+6E= From: Kim Soo To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup v2] fix #8109: catalog: dump: print file mtime in UTC Date: Wed, 18 Nov 2026 15:06:58 +0900 Message-ID: <20261118060658.1515616-1-popododo0720@naver.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261118054052.1497779-1-popododo0720@naver.com> References: <20261118054052.1497779-1-popododo0720@naver.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy FREEMAIL_ENVFROM_END_DIGIT 1 Envelope-from freemail username ends in digit FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record X-MailFrom: popododo0720@naver.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation Message-ID-Hash: V47D2J25CBYQIVWI4WDRTY62OKEELGZD X-Message-ID-Hash: V47D2J25CBYQIVWI4WDRTY62OKEELGZD X-Mailman-Approved-At: Fri, 20 Nov 2026 14:58:13 +0100 CC: Kim Soo X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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( 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 CatalogReader { } 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