From fd875603883fa60049a7f3cff9e80a821e16e9b7 Mon Sep 17 00:00:00 2001 From: nielash Date: Tue, 9 Sep 2025 05:22:03 -0400 Subject: [PATCH] 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. --- backend/local/local_internal_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/local/local_internal_test.go b/backend/local/local_internal_test.go index b54cb3fae..2fd4fcaac 100644 --- a/backend/local/local_internal_test.go +++ b/backend/local/local_internal_test.go @@ -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)