From 9e2f7abf0d3a466328e335d251c567ce4194e473 Mon Sep 17 00:00:00 2001 From: Jan Kandziora Date: Wed, 12 Apr 2023 01:27:46 +0200 Subject: [PATCH] bugfix: set UTC timezone when not timezone is set --- xfs_undelete | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xfs_undelete b/xfs_undelete index ae4786d..238f7c4 100755 --- a/xfs_undelete +++ b/xfs_undelete @@ -25,6 +25,13 @@ set filetypes { set sectsize 512 +## Set UTC timezone if the timezone cannot be detected. +if {[catch {clock scan "now"}]} { + set env(TZ) ":UTC" + puts stderr "Timezone cannot be detected. Defaulting to UTC." +} + + ## ## Functions. ##