From 30a815e329124086a16c177d940496644e22382b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 6 Dec 2021 11:25:22 +0100 Subject: [PATCH] DMS: Webdav-Backend: Dateizeit mit lokaler Zeitzone holen --- SL/File/Backend/Webdav.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/File/Backend/Webdav.pm b/SL/File/Backend/Webdav.pm index f0abfd4d7..2956e03f9 100644 --- a/SL/File/Backend/Webdav.pm +++ b/SL/File/Backend/Webdav.pm @@ -11,6 +11,7 @@ use File::Slurp; use File::Basename; use File::Path qw(make_path); use File::MimeInfo::Magic; +use File::stat; # # public methods @@ -74,8 +75,7 @@ sub get_mtime { $main::lxdebug->message(LXDebug->DEBUG2(), "version=" .$params{version}); my ($path, undef, undef) = $self->webdav_path($params{dbfile}); die "No file found in Backend: " . $path unless -f $path; - my @st = stat($path); - my $dt = DateTime->from_epoch(epoch => $st[9])->clone(); + my $dt = DateTime->from_epoch(epoch => stat($path)->mtime, time_zone => $::locale->get_local_time_zone()->name)->clone(); $main::lxdebug->message(LXDebug->DEBUG2(), "dt=" .$dt); return $dt; } -- 2.20.1