serve ftp: ensure modtime is passed as UTC always to fix timezone oddities
See: https://forum.rclone.org/t/ftp-server-reports-file-timestamps-in-utc/26274
This commit is contained in:
parent
c821fbeddf
commit
fc5d6c16b6
1 changed files with 6 additions and 0 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"os/user"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rclone/rclone/cmd"
|
||||
|
@ -503,6 +504,11 @@ func (f *FileInfo) Group() string {
|
|||
return g.Name
|
||||
}
|
||||
|
||||
// ModTime returns the time in UTC
|
||||
func (f *FileInfo) ModTime() time.Time {
|
||||
return f.FileInfo.ModTime().UTC()
|
||||
}
|
||||
|
||||
func closeIO(path string, c io.Closer) {
|
||||
err := c.Close()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue