1
0
mirror of https://github.com/rclone/rclone.git synced 2025-09-16 08:36:38 +02:00

local: fix time zones on tests

Before this change, TestMetadata could fail due to a difference between the
user's local time zone and UTC causing the string representation of the date to
be off by one day. This change fixes the issue by comparing both in the Local
time zone.
This commit is contained in:
nielash
2025-09-09 05:22:03 -04:00
parent d87720a787
commit fd87560388

View File

@@ -334,7 +334,7 @@ func TestMetadata(t *testing.T) {
func testMetadata(t *testing.T, r *fstest.Run, o *Object, when time.Time) {
ctx := context.Background()
whenRFC := when.Format(time.RFC3339Nano)
whenRFC := when.Local().Format(time.RFC3339Nano)
const dayLength = len("2001-01-01")
f := r.Flocal.(*Fs)