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:
Nick Craig-Wood committed 2021-10-15 15:25:51 +01:00
1 parent c821fbeddf
commit fc5d6c16b6
1 file changed
+6
+6
View File
@@ -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 {