Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Commit 81d5596

Browse files
committed
Fix timezone
1 parent b2eb13b commit 81d5596

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

infra/store/entry/entry_store.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ func (s *entryStoreImpl) CreateEntries(blog *record.Blog, feed *gofeed.Feed) (n
7979
AuthorID: blog.UserID,
8080
GUID: guid,
8181
BlogID: blog.ID,
82-
PublishedAt: null.TimeFromPtr(item.PublishedParsed),
8382
}
8483
if i := item.Image; i != nil {
8584
e.ImageURL = i.URL
8685
}
86+
if t := item.PublishedParsed; t != nil {
87+
e.PublishedAt = null.TimeFrom(t.In(boil.GetLocation()))
88+
}
8789

8890
err = e.Insert(s.ctx, tx, boil.Infer())
8991
if err != nil {

0 commit comments

Comments
 (0)