Revision 30a815e3
Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt
SL/File/Backend/Webdav.pm | ||
---|---|---|
11 | 11 |
use File::Basename; |
12 | 12 |
use File::Path qw(make_path); |
13 | 13 |
use File::MimeInfo::Magic; |
14 |
use File::stat; |
|
14 | 15 |
|
15 | 16 |
# |
16 | 17 |
# public methods |
... | ... | |
74 | 75 |
$main::lxdebug->message(LXDebug->DEBUG2(), "version=" .$params{version}); |
75 | 76 |
my ($path, undef, undef) = $self->webdav_path($params{dbfile}); |
76 | 77 |
die "No file found in Backend: " . $path unless -f $path; |
77 |
my @st = stat($path); |
|
78 |
my $dt = DateTime->from_epoch(epoch => $st[9])->clone(); |
|
78 |
my $dt = DateTime->from_epoch(epoch => stat($path)->mtime, time_zone => $::locale->get_local_time_zone()->name)->clone(); |
|
79 | 79 |
$main::lxdebug->message(LXDebug->DEBUG2(), "dt=" .$dt); |
80 | 80 |
return $dt; |
81 | 81 |
} |
Auch abrufbar als: Unified diff
DMS: Webdav-Backend: Dateizeit mit lokaler Zeitzone holen