-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Posts not showing correctly in Week & Day View #450
Comments
I can't currently access Postiz to try and replicate this, but I believe it's to do with timezones and only impacts if it's around the 1st of a month. Once I get a chance to sort out why my instance has died after the v1.11.2 update I'll see if I can replicate it again, might be a week or so with the holidays. |
We had a small problem with cahcing, mind checking it again?
…On Thu, Dec 26, 2024 at 12:51 PM Tate Hill ***@***.***> wrote:
I can't currently access Postiz to try and replicate this, but I believe
it's to do with timezones and only impacts if it's around the 1st of a
month. Once I get a chance to sort out why my instance has died after the
v1.11.2 update I'll see if I can replicate it again, might be a week or so
with the holidays.
—
Reply to this email directly, view it on GitHub
<#450 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AX32VBRB4EN4EX37Q4Z4WV32HOKNBAVCNFSM6AAAAABSU4CXDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRSGE4DINRSGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Cheers, updated Postiz and confirmed it's up and running again. Replicated the calendar issue, not 100% sure what a reproducer is though sorry so let me know what other info you require. Unfortunately I haven't had a chance to dig further into it myself so everything below is just best guesses. I inserted a draft on the 1st Jan 2025 at 4:59am, and can't see it in the January calendar view, but it does show on the December view under the 1st. I suspect it's an issue of the backend using UTC time or something like that and the frontend comparing it against my timezone (Australia/Brisbane - GMT +10)? I changed the 4:59am to 11:59am and it shows now in January: The date shown in the docker logs when I enter the 4:59am on 1st Jan is "date": "2024-12-31T18:59:59". I also notice the 31st Dec doesn't show in the January view despite the days being there, I assume it should be showing though? Happy to do any further testing or grab any logs, etc. that are required, |
I've reviewed the SQL code on the server (/libraries/nestjs-libraries/src/database/prisma/posts/posts.repository.ts#L69), and I believe the issue arises because the backend is using isoWeek as a filtering condition. For example, if a post's published time is 2025-01-06 01:00+10:00, its corresponding UTC time would be 2025-01-05 15:00+00:00 (GMT). Under the isoWeek filtering condition, this post would be categorized as belonging to the previous day/week. This means that for users in the UTC+10:00 timezone, the backend's filtering process, which operates based on UTC+00:00, causes content from the first 10 hours of the week (the first day) to be excluded from that week's view altogether since it's not selected by the SQL query. While the previous week may include results from these posts, they won't be displayed on the frontend because the week view is set to UTC+10:00. This issue also consistently emerges in the daily view, where only content from 10:00 AM of the current day to 10:00 AM of the following day is displayed. This leads to a kind of disarray in the presentation. |
@timczm do you think you can solve it? |
@nevo-david I'm unable to start the project on my computer. Specifically, I always get an error when trying to start the backend server. The database services (PostgreSQL, Redis) and the frontend services are running well. My computer runs on Windows, which might be the reason for the issue. C:\Users\xx\projects\postiz-app\node_modules@langchain\openai\dist\chat_models.cjs:1109 |
📜 Description
Scheduled posts not appearing in week calendar view, they are however visible in month view.
Posts are scheduled in Week 49 - on Monday 2/12/2024. Frontend view for week where they're not available is URL is /launches?day=0&week=49&month=10&year=2024&display=week
👟 Reproduction steps
Edit Post View showing scheduled date/time.
👍 Expected behavior
Display scheduled posts under the Week & Day (Displays a day early in the UI) View.
👎 Actual Behavior with Screenshots
Only shows correctly under Month view.
Day View:
Week View:
Month View:
💻 Operating system
Linux
🤖 Node Version
v20.17.0
📃 Provide any additional context for the Bug.
Able to find the post on this API endpoint: /api/posts?display=week&day=0&week=48&month=11&year=2024
Publish Date from API endpoint is "publishDate":"2024-12-01T21:00:00.000Z"
Postiz timezone is set to GMT +10 Brisbane.
👀 Have you spent some time to check if this bug has been raised before?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: