From: Bernd Bleßmann Date: Mon, 6 Dec 2021 10:25:22 +0000 (+0100) Subject: DMS: Webdav-Backend: Dateizeit mit lokaler Zeitzone holen X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~256 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=30a815e329124086a16c177d940496644e22382b;p=kivitendo-erp.git DMS: Webdav-Backend: Dateizeit mit lokaler Zeitzone holen --- 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; }