From 0468375054edecf3e88c73f247e2bb5d40ff8cd6 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 3 May 2023 10:46:54 +0100 Subject: [PATCH] uptobox: ensure files and folders show the modtime configured by --default-time #6986 --- backend/uptobox/uptobox.go | 3 ++- docs/content/uptobox.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/uptobox/uptobox.go b/backend/uptobox/uptobox.go index ad827377b..4f09ad8e6 100644 --- a/backend/uptobox/uptobox.go +++ b/backend/uptobox/uptobox.go @@ -923,7 +923,8 @@ func (o *Object) Remote() string { // It attempts to read the objects mtime and if that isn't present the // LastModified returned in the http headers func (o *Object) ModTime(ctx context.Context) time.Time { - return time.Now() + ci := fs.GetConfig(ctx) + return time.Time(ci.DefaultTime) } // Size returns the size of an object in bytes diff --git a/docs/content/uptobox.md b/docs/content/uptobox.md index 7324058fc..7f6e750ab 100644 --- a/docs/content/uptobox.md +++ b/docs/content/uptobox.md @@ -84,7 +84,8 @@ To copy a local directory to an Uptobox directory called backup ### Modified time and hashes -Uptobox supports neither modified times nor checksums. +Uptobox supports neither modified times nor checksums. All timestamps +will read as that set by `--default-time`. ### Restricted filename characters