diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 634f75d..55454cd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,4 +33,4 @@ jobs: just sysinfo - name: Run Go Test run: | - just init tidy lint test + just init tidy lint tests diff --git a/calendars.go b/calendars.go index 337e481..9600be2 100644 --- a/calendars.go +++ b/calendars.go @@ -3,7 +3,9 @@ package sitemaps -import "time" +import ( + "time" +) type CalendarDay struct { Year int diff --git a/sitemap.go b/sitemap.go index ad39514..8e23592 100644 --- a/sitemap.go +++ b/sitemap.go @@ -48,6 +48,6 @@ func EncodeLocation(original string) string { } func EncodeUnix(unix int64) CalendarDay { - t := time.Unix(unix, 0) + t := time.Unix(unix, 0).In(time.UTC) return DayFrom(t) } diff --git a/sitemap_test.go b/sitemap_test.go index 97fa24f..0315843 100644 --- a/sitemap_test.go +++ b/sitemap_test.go @@ -40,5 +40,5 @@ func TestEncodeUnix(t *testing.T) { result := EncodeUnix(1750036057) must.Eq(t, 2025, result.Year) must.Eq(t, 6, result.Month) - must.Eq(t, 15, result.Day) + must.Eq(t, 16, result.Day) }